-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.21 KB
/
ci.yaml
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
name: CI
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
paths-ignore:
- ".git-hooks/*"
- ".github/**"
- "!.github/workflows/ci.yaml"
- "!.github/workflows/docker-bake.yaml"
- ".gitignore"
- "**.md"
- "Makefile*"
push:
branches:
- master
paths-ignore:
- ".git-hooks/*"
- ".github/**"
- "!.github/workflows/ci.yaml"
- "!.github/workflows/docker-bake.yaml"
- ".gitignore"
- "**.md"
- "Makefile*"
concurrency:
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}.
# On master, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke.
group: ci-${{ github.ref_name == 'master' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
jobs:
docker-bake:
uses: ./.github/workflows/docker-bake.yaml
permissions:
contents: read
id-token: write
pull-requests: read
code-style:
runs-on: ubuntu-latest
needs: docker-bake
timeout-minutes: 15
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Prepare Docker Workspace
id: docker-prepare-workspace
uses: ./.github/actions/docker-prepare-workspace
with:
docker-image-tag: ${{ needs.docker-bake.outputs.docker-image-tag }}
docker-compose-services: "app"
make-init-targets: "install"
- name: Run Svelte Check
run: docker compose exec app pnpm run check
tests:
runs-on: ubuntu-latest
needs: docker-bake
timeout-minutes: 25
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Prepare Docker Workspace
id: docker-prepare-workspace
uses: ./.github/actions/docker-prepare-workspace
with:
docker-image-tag: ${{ needs.docker-bake.outputs.docker-image-tag }}
make-init-targets: "install build-schema"
- name: Run Test Suite
run: docker compose exec app pnpm run test