Skip to content

Update GitHub Action Versions #52

Update GitHub Action Versions

Update GitHub Action Versions #52

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/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/[email protected]
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
pip install -r requirements_dev.txt
- name: Install package
run: pip install .
- name: Test package
run: pytest --cov-config=pyproject.toml --cov-report=xml --cov=pkg --cov=tests
- name: Run codacy-coverage-reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml