[pre-commit.ci] pre-commit autoupdate #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit test | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
unit_test: | |
name: Unit test [py${{ matrix.python }}] | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Set up Python | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Set up Python environment | |
uses: glotzerlab/workflows/setup-uv@5cfac9da9cb78e16ae97a9119b6fd13c1c2d6f5e # 0.1.0 | |
with: | |
lockfile: ".github/workflows/requirements-test.txt" | |
- name: Run tests | |
run: python3 -m pytest -v | |
# This job is used to provide a single requirement for branch merge conditions. | |
tests_complete: | |
name: Unit test | |
if: always() | |
needs: [unit_test] | |
runs-on: ubuntu-latest | |
steps: | |
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' | |
- name: Done | |
run: exit 0 |