Skip to content

chore(pre-commit): autoupdate hooks (#58) #83

chore(pre-commit): autoupdate hooks (#58)

chore(pre-commit): autoupdate hooks (#58) #83

Workflow file for this run

name: Run tests
on:
pull_request:
push:
branches:
- "main"
defaults:
run:
shell: bash
jobs:
test:
strategy:
matrix:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
os: [windows-latest, macos-latest] # ubuntu-latest is done below for the coverage report
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: .github/workflows/.python-version
cache: pip
cache-dependency-path: "**/pyproject.toml"
- name: Install package
run: pip install -e .[test]
- name: Test
run: ./bin/coverage.sh
coverage:
needs: test
runs-on: ubuntu-latest
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: .github/workflows/.python-version
cache: pip
cache-dependency-path: "**/pyproject.toml"
- name: Install package
run: pip install -e .[test]
- name: Test
run: ./bin/coverage.sh
- name: Coverage comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 80