-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (67 loc) · 2 KB
/
ci.yaml
File metadata and controls
85 lines (67 loc) · 2 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
name: CI
on:
workflow_dispatch:
pull_request:
permissions:
contents: read # for checkout
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changed:
runs-on: ubuntu-latest
name: 'Check differences'
outputs:
should_skip: ${{ steps.changed-files.outputs.only_changed == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@a284dc1814e3fd07f2e34267fc8f81227ed29fb8 # v45.0.9
with:
files: |
docs/**
.github/**
!.github/workflows/ci.yml
**.md
run-tests:
needs: changed
name: 'Build & Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
# if: needs.changed.outputs.should_skip != 'true'
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-latest ]
node_version: [ 22, 23 ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # tag=v2.11.2
with:
disable-sudo: true
egress-policy: audit
- uses: ./.github/actions/setup-and-cache
with:
node-version: ${{ matrix.node_version }}
- uses: browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce # v1.7.3
- name: Install pnpm
run: pnpm i
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test:ci
test-image-compilation:
name: "Test production image compilation"
runs-on: ubuntu-latest
steps:
- name: Checkout # required for finding action
uses: actions/checkout@v4
- uses: ./.github/actions/build-docker-image
with:
platforms: linux/amd64
docker_file: prod.Dockerfile
push: 'false'
token: ${{ secrets.GITHUB_TOKEN }}