-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (83 loc) · 2.87 KB
/
ci.yml
File metadata and controls
101 lines (83 loc) · 2.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Continuous Integration
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
permissions:
contents: read
checks: write
actions: read
pull-requests: write
env:
NODE_VERSION: "24"
jobs:
build-and-test:
name: Build & Test
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Enable Corepack (Yarn Berry)
run: corepack enable
- name: Setup Yarn Berry
run: yarn set version 4.12.0
- name: Restore Yarn Cache
uses: actions/cache@v4
with:
path: |
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.pnp.cjs
key: yarn-${{runner.os}}-${{hashFiles('**/yarn.lock')}}
restore-keys: yarn-${{runner.os}}-
- name: Install Dependencies (Yarn Berry)
run: yarn install --immutable
- name: Restore Turborepo Cache
uses: actions/cache@v4
with:
path: .turbo
key: turbo-${{runner.os}}-${{hashFiles('turbo.json', 'package.json', '**/package.json')}}
restore-keys: turbo-${{runner.os}}-
- name: Run Typecheck
run: yarn typecheck
- name: Run Lint
run: yarn lint
- name: Run Tests with Coverage
run: yarn test:coverage
- name: Report Test Logs
uses: dorny/test-reporter@v1
if: (!cancelled())
with:
name: Test Logs
path: "**/.coverage/report.xml"
reporter: java-junit
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
if: (!cancelled())
with:
name: Test Reports
path: |
**/.coverage/report.xml
**/coverage/**/*
retention-days: 7
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: (!cancelled())
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/**/.coverage/lcov.info
fail_ci_if_error: false
verbose: true
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: (!cancelled())
with:
files: "**/.coverage/report.xml"