fix Ci bugs #3
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: run tests | |
# push to master should already be tested locally | |
on: | |
pull_request: | |
push: | |
branches: ["master"] | |
jobs: | |
run_tests: | |
strategy: | |
matrix: | |
python-version: [ "3.10", "3.12"] | |
os: [ubuntu-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r ./test/requirements.txt | |
python -m pip install . | |
- name: Checks with pre-commit | |
uses: pre-commit/action@v2.0.3 | |
# use the pytest action with xdist to run tests in parallel, only run tests marked as fast | |
- name: Test with pytest | |
run: | | |
python -m pytest -v -m fast -n 4 |