feat: move python env setup to full UV flow #290
Workflow file for this run
This file contains hidden or 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: Run Tests and Check Documentation | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci-checks: | |
| runs-on: ubuntu-24.04-arm | |
| container: | |
| image: python:3.13-slim | |
| options: --user root | |
| env: | |
| TASKFILE_VERSION: 'v3.44.0' | |
| TASKFILE_PATH: '/home/runner/go/bin' | |
| steps: | |
| - name: Install git | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends --no-install-suggests git ca-certificates curl | |
| git config --global --add safe.directory '*' | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| set -e | |
| which task || curl -sSfL https://taskfile.dev/install.sh | sh -s -- -b ${{ env.TASKFILE_PATH }} ${{ env.TASKFILE_VERSION }} | |
| export PATH="${{ env.TASKFILE_PATH }}:$PATH" | |
| export SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 | |
| task init:ci | |
| - name: Check code formatting | |
| run: | | |
| set -e | |
| export PATH="${{ env.TASKFILE_PATH }}:$PATH" | |
| task fmt > /dev/null 2>&1 | |
| if git diff --quiet; then | |
| echo "Code is properly formatted." | |
| else | |
| echo "Please format the code by running 'task fmt'." | |
| exit 1 | |
| fi | |
| - name: Check linting | |
| run: | | |
| set -e | |
| export PATH="${{ env.TASKFILE_PATH }}:$PATH" | |
| task lint > /dev/null 2>&1 | |
| if git diff --quiet; then | |
| echo "Code is properly linted." | |
| else | |
| echo "Please lint the code by running 'task lint'." | |
| exit 1 | |
| fi | |
| - name: Check license headers and files | |
| run: | | |
| set -e | |
| export PATH="${{ env.TASKFILE_PATH }}:$PATH" | |
| task license:headers > /dev/null 2>&1 | |
| if git diff --quiet; then | |
| echo "License headers are up to date!" | |
| else | |
| echo "Please update license headers by running 'task license:headers'." | |
| exit 1 | |
| fi | |
| - name: Run tests | |
| run: | | |
| useradd -m testuser | |
| chown -R testuser:testuser . | |
| runuser -u testuser -- env PATH="${{ env.TASKFILE_PATH }}:$PATH" task test |