-
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 1.08 KB
/
CI.yml
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
name: "CI"
on:
push
concurrency:
# See https://github.com/TWiStErRob/github-workflows/blob/main/snippets/cancel-pr-ci-on-push.yml
group: ${{ github.ref == 'refs/heads/main' && format('ci-main-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true
jobs:
validate:
name: "🦺 Validation"
uses: TWiStErRob/github-workflows/.github/workflows/validate.yml@v1
build:
name: "🔨 Build & Verify"
uses: ./.github/workflows/CI-build.yml
needs:
- validate
prepare:
name: "Prepare"
uses: ./.github/workflows/CI-pr.yml
# Don't execute on main, it'll never be PR'd.
if: github.ref != 'refs/heads/main' && (success() || failure())
screenshot:
name: "📷 Screenshot Tests"
uses: ./.github/workflows/CI-screenshot.yml
with:
base_ref: ${{ needs.prepare.outputs.base_ref }}
head_ref: ${{ needs.prepare.outputs.head_ref }}
needs:
- validate
- prepare
# Don't execute on main, as it'll just verify against itself.
if: github.ref != 'refs/heads/main' && needs.prepare.outputs.found == 'true'