Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: CI
permissions:
contents: read
pull-requests: write
permissions: {}
on:
workflow_dispatch:
push:
Expand All @@ -20,13 +18,18 @@ concurrency:
cancel-in-progress: true
jobs:
tests:
permissions:
contents: read
pull-requests: write # Needed to add Codecov and CodSpeed comments
name: ${{ (matrix.codecov == 'true' && 'Codecov') || (matrix.codspeed == 'true' && 'CodSpeed') || format('Test Python {0} {1}', matrix.python_version, ((matrix.dependencies == 'min' || matrix.dependencies == 'max') && format('{0} dependencies', matrix.dependencies)) || (matrix.os || 'ubuntu-latest')) }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
env:
PYTHONIOENCODING: utf-8
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Setup git user config
run: |
Expand All @@ -51,8 +54,11 @@ jobs:

- name: Setup dependencies
run: |
uv python pin ${{ matrix.python_version }}
uv sync --resolution ${{ matrix.dependencies == 'min' && 'lowest-direct' || 'highest' }}
uv python pin $CI_PYTHON_VERSION
uv sync
env:
UV_RESOLUTION: ${{ matrix.dependencies == 'min' && 'lowest-direct' || 'highest' }}
CI_PYTHON_VERSION: ${{ matrix.python_version }}

- name: Run prek
if: ${{ matrix.pre_commit == null || matrix.pre_commit == 'true' }}
Expand Down
51 changes: 26 additions & 25 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
name: "CodeQL"

permissions: {}
on:
push:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'mkdocs.yml'
- "docs/**"
- "**/*.md"
- "mkdocs.yml"
pull_request:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'mkdocs.yml'
- "docs/**"
- "**/*.md"
- "mkdocs.yml"
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
permissions:
# required for all workflows
security-events: write
security-events: write # Required for all workflows
strategy:
fail-fast: false
matrix:
include:
- language: actions
- language: python
- language: actions
- language: python
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
42 changes: 23 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@

name: Release to PyPI
permissions:
contents: read
permissions: {}
on:
push:
tags:
- 'v*'
- "v*"
jobs:
deploy:
name: Release

runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: read
id-token: write # Needed for trusted publishing
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
version: "latest"
- name: Set up uv
uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
version: "latest"
enable-cache: false

- name: "Set up Python"
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
- name: "Set up Python"
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12

- name: Release
run: |
uv build
uv publish --trusted-publishing always
- name: Release
run: |
uv build
uv publish --trusted-publishing always