Skip to content

fix(ci): address zizmor security findings in workflows #805

fix(ci): address zizmor security findings in workflows

fix(ci): address zizmor security findings in workflows #805

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.12"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3.2.4
with:
enable-cache: true
- name: Set up Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install dependencies
run: |
uv sync --python ${{ matrix.python }}
- name: Test with pytest & coverage
run: |
uv run --python ${{ matrix.python }} pytest --cov=src --cov-report term --cov-report html --cov-report xml -vv
# TODO requires activation for this repository on codecov website first.
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3.2.4
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Install dependencies
run: |
uv sync
- name: Lint with ruff
run: |
uv run ruff check .
- name: Lint with mypy
run: |
uv run mypy .
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3.2.4
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Install dependencies
run: |
uv sync
- name: Generate Reference Docs
run: |
mkdir ./docs/build
uv run ./docs/generate.sh --out=./docs/build/ --pypath=src/
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
name: Upload Docs Preview
with:
name: reference-docs
path: ./docs/build/
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3.2.4
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Install dependencies
run: |
uv sync
- name: Check Formatting with ruff
run: |
uv run ruff format --check .