-
-
Notifications
You must be signed in to change notification settings - Fork 26
105 lines (86 loc) · 3.12 KB
/
verify.yml
File metadata and controls
105 lines (86 loc) · 3.12 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Verify
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
ci-gate:
name: CI Gate
if: always()
needs: [checks, test]
runs-on: ubuntu-latest
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled"
exit 1
fi
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Audit dependencies
run: pnpm audit
- name: Lint & format
run: pnpm check:ci
- name: Check types
run: pnpm dev && pnpm check:types && pnpm check:types:examples
test:
name: Test Runtime (${{ matrix.shard }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
shard: [1/3, 2/3, 3/3]
env:
VITE_TEMPO_TAG: sha-20aecec
steps:
- name: Clone repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Docker
uses: docker/setup-docker-action@e43656e248c0bd0647d3f5c195d116aacf6fcaf4 # v4.7.0
- name: Install secret-tool (libsecret)
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
with:
packages: libsecret-tools gnome-keyring dbus-x11
version: 1.0
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Cache Playwright browsers
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-chromium-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install chromium
- name: Install Playwright system deps
run: pnpm exec playwright install-deps chromium
- name: Cache Tempo Docker image
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: docker-cache
with:
path: /tmp/tempo-image.tar
key: tempo-image-${{ env.VITE_TEMPO_TAG }}
- name: Load cached Tempo image
if: steps.docker-cache.outputs.cache-hit == 'true'
run: docker load -i /tmp/tempo-image.tar
- name: Pull and cache Tempo image
if: steps.docker-cache.outputs.cache-hit != 'true'
run: |
docker pull ghcr.io/tempoxyz/tempo:${VITE_TEMPO_TAG}
docker save ghcr.io/tempoxyz/tempo:${VITE_TEMPO_TAG} -o /tmp/tempo-image.tar
- name: Run tests
run: |
eval "$(dbus-launch --sh-syntax)"
eval "$(printf '\n' | gnome-keyring-daemon --unlock)"
eval "$(printf '\n' | gnome-keyring-daemon --start)"
pnpm run test --bail=1 --shard=${{ matrix.shard }}
env:
CI: true