Skip to content

Update GitHub Action Versions #93

Update GitHub Action Versions

Update GitHub Action Versions #93

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 hatch
- name: Build package
run: hatch build
- name: Test package
run: hatch run test:run-coverage-xml --python ${{ matrix.python-version }}
- name: Run codacy-coverage-reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml