Skip to content

[pre-commit.ci] pre-commit autoupdate #674

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #674

Workflow file for this run

# This workflow will run the tests of the project
name: Tests
# Controls when the action will run.
on:
push:
branches: ["*"]
pull_request:
types: [opened]
workflow_dispatch:
jobs:
code-change:
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths_ignore: '[
"docs/**",
".github/**",
".resources/**",
"logos/**",
"README.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
".pre-commit-config.yaml",
".readthedocs.yaml",
"pyproject.toml"
]'
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
tests:
needs: code-change
if: ${{ needs.code-change.outputs.should_skip != 'true'}}
strategy:
matrix:
os: [windows-latest, macos-latest]
python-version: ["3.8", "3.12"] # check oldest and latest supported version
other-os: [true]
runs-on: ${{ matrix.os }}
continue-on-error: false # don't cancel due to OS specific failures
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
- name: Build and install
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install .[test]
- name: Run tests
run: |
pytest tests/ --cov=pyrekordbox --cov-report=xml -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON
verbose: True