Skip to content

👷 update build system #105

👷 update build system

👷 update build system #105

Workflow file for this run

name: Running Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
jobs:
pre_commit:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache pre-commit paths
uses: actions/cache@v2
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~/.cache/pre-commit
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
hashFiles('.pre-commit-config.yaml') }}
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install-pre-commit
run: python -m pip install --upgrade pre-commit
- name: Run Pre-commit Checks
run: pre-commit run --all-files
test:
name: Tests
needs: [ pre_commit ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
- name: Upload coverage
if: (github.event_name != 'workflow_call') && (matrix.python-version == '3.8') && startsWith(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v2