Skip to content

try runner temp

try runner temp #214

Workflow file for this run

name: CI
on:
push:
defaults:
run:
shell: bash -el {0}
jobs:
unit-tests:
name: pytest
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, environment: py38 }
- { os: ubuntu-latest, environment: py312 }
- { os: windows-latest, environment: py38 }
- { os: windows-latest, environment: py312 }
- { os: macos-latest, environment: py38 }
- { os: macos-latest, environment: py312 }
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Fetch full git history
run: git fetch --prune --unshallow
- name: Set up pixi
uses: prefix-dev/setup-pixi@19b5e6071f70a82d3c5741d7b3f98a71d192eb20
with:
environments: ${{ matrix.environment }}
- name: Install repository
run: pixi run -e ${{ matrix.environment }} postinstall
- name: Run pytest
id: pytest
run: |
REPORT="${{ runner.temp }}/report"
echo "report-path=$REPORT" >> $GITHUB_OUTPUT
pixi run -e ${{ matrix.environment }} pytest -v --md=$REPORT --emoji
shell: bash -el {0} # use login shell to source .bashrc for environments
- name: Add report to summary
run: |
echo "::group::..."
FINAL_REPORT="${{ runner.temp }}/output"
echo "# Unit tests ${{ matrix.environment }}" > "$FINAL_REPORT"
echo "<details><summary>Click to expand!</summary>" >> "$FINAL_REPORT"
tail -n+2 "${{ steps.pytest.outputs.report-path }}" >> "$FINAL_REPORT"
echo "</details>" >> "$FINAL_REPORT"
cat "$FINAL_REPORT" >> "$GITHUB_STEP_SUMMARY"
echo "::endgroup::"
echo
echo "====================================================================================="
echo Markdown summaries: "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
echo "====================================================================================="
shell: bash
mypy-type-checks:
name: Mypy Type Checks
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up pixi
uses: prefix-dev/setup-pixi@632d17935141ec801697e2c359784b878adecbbe
- name: Install repository
run: pixi run postinstall
- name: Run mypy
run: pixi run mypy
pre-commit-checks:
name: Pre-commit Checks
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/setup-pixi@d72307a91ccc8a856376cdb9ff5b074a04422409
with:
environments: lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure