-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 1.87 KB
/
test.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
name: test
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2.0.1
with:
bun-version-file: .bun-version
- run: bun install --frozen-lockfile
- run: bun run build
- name: Upload built project
uses: actions/upload-artifact@v4
with:
path: ./dist
overwrite: true
retention-days: 1
name: build-artifacts-${{ github.run_id }}
lint:
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2.0.1
with:
bun-version-file: .bun-version
- run: bun install --frozen-lockfile
- name: Lint
run: bun run lint:report
- name: Annotate Code Linting Results
if: always()
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint_report.json"
- uses: actions/upload-artifact@v4
if: always()
with:
name: eslint-report
if-no-files-found: error
retention-days: 30
path: eslint_report.json
test:
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2.0.1
with:
bun-version-file: .bun-version
- run: bun install --frozen-lockfile
- run: timeout 12s bun pre-commit
- run: bun run test
- run: ./check-lines.sh
- name: Bundle size breakdown
run: |
bun run build --sourcemap true
node src/ci/dependency_report.cjs dist/ | column -t -s ":"
- run: ./check-bundle-size.sh