[pre-commit.ci] pre-commit autoupdate #199
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: continuous-integration | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- uses: pre-commit/[email protected] | |
build-package: | |
needs: [pre-commit] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install flit | |
run: | | |
python -m pip install flit==3.7.1 | |
- name: Build | |
run: | | |
flit build | |
test-package: | |
needs: [pre-commit] | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip and setuptools | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip --version | |
- name: Install package | |
run: | | |
which python | |
python -m pip install .[tests] | |
python -m pip freeze | |
- name: Run tests | |
run: python -m pytest -v |