ci: harden contributor checks (#254)
* ci: harden contributor checks * ci: pin setup-uv action release * ci: split workflow checks * docs: clarify required checks
This commit is contained in:
64
.github/workflows/ci.yml
vendored
64
.github/workflows/ci.yml
vendored
@ -2,7 +2,7 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, dev, master]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
# Cancel superseded runs on the same ref to save CI minutes.
|
||||
@ -14,14 +14,14 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: lint + test + integration
|
||||
lint:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v4
|
||||
uses: astral-sh/setup-uv@v8.2.0
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: uv.lock
|
||||
@ -35,8 +35,62 @@ jobs:
|
||||
- name: Lint (ruff + import-linter + datetime + openapi drift)
|
||||
run: make lint
|
||||
|
||||
unit:
|
||||
name: unit tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v8.2.0
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: uv.lock
|
||||
|
||||
- name: Set up Python
|
||||
run: uv python install 3.12
|
||||
|
||||
- name: Install dependencies (frozen)
|
||||
run: make install-deps
|
||||
|
||||
- name: Unit tests
|
||||
run: make test
|
||||
|
||||
integration:
|
||||
name: integration tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v8.2.0
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: uv.lock
|
||||
|
||||
- name: Set up Python
|
||||
run: uv python install 3.12
|
||||
|
||||
- name: Install dependencies (frozen)
|
||||
run: make install-deps
|
||||
|
||||
- name: Integration tests
|
||||
run: make integration
|
||||
|
||||
package:
|
||||
name: package build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v8.2.0
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: uv.lock
|
||||
|
||||
- name: Set up Python
|
||||
run: uv python install 3.12
|
||||
|
||||
- name: Build and smoke-test package
|
||||
run: make package
|
||||
|
||||
Reference in New Issue
Block a user