Merge pull request #691 from alan-turing-institute/develop #773
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: Tests and code quality checks | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
build: | |
name: Run tests and quality checks | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip and poetry | |
run: | | |
python -m pip install --upgrade pip | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install AIrsenal | |
run: poetry install --extras "api" | |
- name: Code quality checks | |
run: | | |
poetry run isort --check-only . | |
poetry run black --check . | |
poetry run flake8 | |
- name: Tests | |
env: | |
FPL_TEAM_ID: 1822891 | |
run: poetry run pytest |