Skip to content

chore: update pre-commit hooks #531

chore: update pre-commit hooks

chore: update pre-commit hooks #531

Workflow file for this run

name: CI
on: [push, pull_request]
env:
PROJECT_NAME: "gnatss"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit_test:
name: ${{ matrix.python-version }}-unit-test
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
experimental: [false]
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Print system platform
shell: python
run: |
import platform
print(platform.machine().lower())
# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
- name: Install error reporter
if: ${{ matrix.python-version == '3.10' }}
run: |
python -m pip install pytest-github-actions-annotate-failures
- name: Install nox
run: pip install nox
- name: Run unit tests
env:
FORCE_COLOR: 3
run: |
set -o pipefail
nox --verbose -s tests -- --cov=${{ env.PROJECT_NAME }} --cov-report=xml --cov-report=term tests/ |& tee unit_test_log${{ matrix.python-version }}.log
- name: Upload unit test log
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: unit_test_log${{ matrix.python-version }}
path: unit_test_log${{ matrix.python-version }}.log
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
# Don't run coverage on merge queue CI to avoid duplicating reports
# to codecov. See https://github.com/matplotlib/napari-matplotlib/issues/155
if: github.event_name != 'merge_group'
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false