changed python version #5
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: Backend API | |
on: | |
push: | |
paths: | |
- "backend/**" | |
- ".github/workflows/backend.yml" | |
jobs: | |
test: # new | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.9] | |
poetry-version: [1.7.1] | |
os: [windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: backend/ | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install | |
# - name: Run tests | |
# run: poetry run pytest tests.py --cov=./ --cov-report=xml | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
code-quality: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8] | |
poetry-version: [1.7.1] | |
os: [windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: backend/ | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install --no-root | |
# - name: Run automatically format code if not formatted | |
# run: bash format_code.sh | |
- name: Run black | |
run: poetry run black . | |
- name: Run isort | |
run: poetry run isort . --profile black | |
- name: Run flake8 | |
run: poetry run flake8 . | |
- name: Run bandit | |
run: poetry run bandit . |