Add pre-commit for running black excluding database files #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: '3.11' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Display version | |
run: | | |
python --version | |
pip --version | |
- name: Install pypa/build | |
run: | | |
pip install build | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m build | |
- name: Display content dist folder | |
run: | | |
ls -l dist/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/* | |
name: dist | |
test: | |
name: Test Packaging | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: '3.11' | |
steps: | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: actions/download-artifact@v3 | |
- name: Display content working folder | |
run: | | |
ls -R | |
- name: Install distribution | |
run: | | |
pip install --pre --find-links dist exspy[tests] | |
- name: Test distribution | |
run: | | |
pytest --pyargs exspy |