-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (71 loc) · 2 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
name: CI
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
paths-ignore:
- '.github/**'
- '!.github/workflows/ci.yaml'
- '.gitignore'
- '**.md'
push:
branches:
- main
- release@*
paths-ignore:
- '.github/**'
- '!.github/workflows/ci.yaml'
- '.gitignore'
- '**.md'
concurrency:
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}.
# On main, 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 == 'main' && format('ci-main-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
jobs:
code-style:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Enable corepack
run: |
corepack enable
corepack prepare pnpm@latest --activate
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Run Code Style Check
run: pnpm run lint
tests:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Enable corepack
run: |
corepack enable
corepack prepare pnpm@latest --activate
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Start Docker Compose Services
shell: bash
run: |
docker compose up -d --no-build --no-deps --quiet-pull --wait
- name: Run Test Suite
run: pnpm run test