Skip to content

Update GitHub Action Versions #43

Update GitHub Action Versions

Update GitHub Action Versions #43

Workflow file for this run

name: Python application
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4.1.6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4.0.2
with:
# This path is specific to Ubuntu
path:
~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements_dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
- name: Install
run: |
pip install -e .
- name: Test with pytest
run: pytest --cov-config=pyproject.toml --cov-report=xml --cov=pkg --cov=tests
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml