-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (60 loc) · 1.65 KB
/
ci.yml
File metadata and controls
65 lines (60 loc) · 1.65 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
name: CI
on:
push:
branches: ['master']
pull_request:
branches: ['master']
permissions:
contents: read
jobs:
build:
name: Build + check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '22'
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.2'
- run: bun install --frozen-lockfile
# `bun run build` chains: fetch → astro check → astro build. Splitting
# check into its own step would fail because the typed JSON imports
# depend on the data fetched in the build step.
- run: bun run build
- uses: actions/upload-artifact@v5
with:
name: dist
path: dist
retention-days: 1
lighthouse:
name: Lighthouse CI
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '22'
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.2'
- run: bun install --frozen-lockfile
- uses: actions/download-artifact@v5
with:
name: dist
path: dist
- run: bunx @lhci/cli@0.15 autorun --config=./lighthouserc.cjs
docker:
name: Docker smoke build
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v5
- run: docker build -t nedaa-website:ci .
- name: Smoke test
run: |
docker run --rm -d --name web -p 8080:80 nedaa-website:ci
for _ in 1 2 3 4 5; do sleep 2; curl -fsS http://localhost:8080/ && break; done
docker rm -f web