From c3b4e6753f0abd287c938fdcdb5c262f8fa0d272 Mon Sep 17 00:00:00 2001 From: Robbie Kershaw Date: Thu, 5 Mar 2026 23:56:29 +0000 Subject: [PATCH] Add GitHub Actions CI workflow - Uses uv to run pytest - Uses trunk to run all checks and lints --- .github/workflows/ci.yaml | 47 +++++++++++++++++++++++++++++++++++++++ .trunk/trunk.yaml | 9 +++++--- 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..0d0f5db --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + - name: Set up Python + run: uv python install + + - name: Install dependencies + run: uv sync --all-extras --dev + + - name: Run pytest + run: uv run pytest + + lint: + name: Lint + runs-on: ubuntu-latest + permissions: + checks: write + contents: read + steps: + - uses: actions/checkout@v4 + + - name: Trunk Code Quality + uses: trunk-io/trunk-action@v1 diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index f89faf9..cbfae3a 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -11,21 +11,24 @@ runtimes: - python@3.10.8 # This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) lint: + disabled: + - mypy enabled: + - actionlint@1.7.8 - ty@0.0.20 - bandit@1.9.4 - black@26.1.0 - - checkov@3.2.506 + - checkov@3.2.507 - git-diff-check - isort@8.0.1 - markdownlint@0.48.0 - prettier@3.8.1 - - ruff@0.15.4 + - ruff@0.15.5 - shellcheck@0.11.0 - shfmt@3.6.0 - taplo@0.10.0 - trivy@0.69.3 - - trufflehog@3.93.6 + - trufflehog@3.93.7 - yamllint@1.38.0 ignore: - linters: [bandit]