Bump actions/checkout from 3 to 4 #33
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: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: π¨ Build distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: π Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: π Install build dependencies | |
run: | | |
python -m pip install wheel --user | |
- name: π¨ Build a binary wheel and a source tarball | |
run: | | |
python setup.py sdist bdist_wheel | |
pre-commit: | |
name: π§Ή Pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: π Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: π Set up pre-commit | |
run: | | |
pip install pre-commit | |
- name: π Run pre-commit | |
run: | | |
pre-commit run --all-files --show-diff-on-failure | |
test-unit: | |
name: π§ͺ Pytest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: π Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: π Set up dependencies | |
run: | | |
pip install -e . -r requirements.txt | |
- name: π Run test suite | |
run: | | |
pytest |