-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (80 loc) · 2.5 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
84
85
86
87
88
89
90
91
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
packages: write
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-before: 'setup'
make-init-targets-after: 'install'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Svelte Check
run: docker compose exec app pnpm run lint
- 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-before: 'setup'
make-init-targets-after: 'install'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Test Suite
run: docker compose exec app pnpm run test