Laia CI #289
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: Laia CI | |
on: | |
push: | |
branches: [master] | |
paths-ignore: ['README.md'] | |
pull_request: | |
schedule: | |
# at 07:00 on Sunday | |
- cron: '0 7 * * SUN' | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Run pre-commit | |
run: | | |
pip install pre-commit | |
pre-commit run --all-files | |
pytest: | |
name: Python ${{ matrix.python }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install requirements | |
run: pip install .[test] | |
- name: Run pytest | |
run: pytest --cov=laia tests | |
- uses: codecov/codecov-action@v3 | |
# upload coverage only for main job | |
if: ${{ matrix.python == '3.8' }} |