Skip to content

Bump actions/setup-python from 4 to 5 #196

Bump actions/setup-python from 4 to 5

Bump actions/setup-python from 4 to 5 #196

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements-dev.txt
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}|${{ hashFiles('requirements-dev.txt') }}
- name: Run pre-commits
run: |
pre-commit run -a
- name: Test with pytest
run: |
pytest --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3.1.1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# flags: unittests
# env_vars: OS,PYTHON
# name: codecov-umbrella
# fail_ci_if_error: true
# path_to_write_report: ./coverage/codecov_report.txt
# verbose: true