-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (79 loc) · 2.39 KB
/
ci.yml
File metadata and controls
89 lines (79 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- 'v*' # Trigger on version tags like v1.0.0
pull_request:
branches:
- main
types:
- opened # When PR is first created
- synchronize # When new commits are pushed to PR
- ready_for_review # When a draft PR is marked as ready
# - edited # When PR title/description is edited (DISABLED to avoid unnecessary runs)
paths-ignore:
- '.github/ISSUE_TEMPLATE/**' # Skip when only issue templates change
- '.github/PULL_REQUEST_TEMPLATE/**' # Skip when only PR templates change
jobs:
check:
# Skip job if PR title starts with [WIP] but still run for non-PR events
if: ${{ !startsWith(github.event.pull_request.title, '[WIP]') || github.event_name != 'pull_request' }}
uses: ./.github/workflows/_check.yml
security:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/security-scan.yml
schema-drift:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_schema_drift.yml
# TODO restore
# lint:
# needs: check
# if: needs.check.outputs.branch-pr == ''
# uses: ./.github/workflows/_tox.yml
# with:
# tox: pre-commit,type-checking
test:
needs: check
if: needs.check.outputs.branch-pr == ''
strategy:
matrix:
runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest
python-version: ["3.12"]
include:
# Include one that runs in the dev environment
- runs-on: "ubuntu-latest"
python-version: "dev"
fail-fast: true
uses: ./.github/workflows/_test.yml
with:
runs-on: ${{ matrix.runs-on }}
python-version: ${{ matrix.python-version }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
container:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_container.yml
permissions:
contents: read
packages: write
docs:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_docs.yml
dist:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_dist.yml
# TODO restore or remove
# release:
# if: github.ref_type == 'tag'
# needs: [dist, docs]
# uses: ./.github/workflows/_release.yml
# permissions:
# contents: write