File tree Expand file tree Collapse file tree 6 files changed +497
-541
lines changed
Expand file tree Collapse file tree 6 files changed +497
-541
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : ' Setup Environment'
2+ description : ' Common setup steps for all jobs'
3+ inputs :
4+ node-version :
5+ description : ' Node.js version to use'
6+ required : false
7+ default : ' 20.9.0'
8+
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - name : Setup Node.js
13+ uses : actions/setup-node@v4
14+ with :
15+ node-version : ${{ inputs.node-version }}
16+ cache : ' yarn'
17+
18+ - name : Install dependencies
19+ shell : bash
20+ run : |
21+ yarn install --frozen-lockfile
22+ yarn install --cwd sample --frozen-lockfile
23+
24+ - name : Inject env file
25+ shell : bash
26+ run : |
27+ echo "export const APP_ID = 'app_id';" >> sample/src/env.ts
28+ echo "export const INITIAL_ROUTE = 'route';" >> sample/src/env.ts
Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - ' **'
7+ push :
8+ branches :
9+ - main
10+
11+ jobs :
12+ lint :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup environment
19+ uses : ./.github/actions/setup
20+
21+ - name : Run linting
22+ run : yarn lint
23+
24+ typescript :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout code
28+ uses : actions/checkout@v4
29+
30+ - name : Setup environment
31+ uses : ./.github/actions/setup
32+
33+ - name : TypeScript check
34+ run : yarn typescript
35+
36+ sample-typescript :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - name : Checkout code
40+ uses : actions/checkout@v4
41+
42+ - name : Setup environment
43+ uses : ./.github/actions/setup
44+
45+ - name : Sample TypeScript check
46+ run : yarn sample:tsc
47+
48+ unit-tests :
49+ runs-on : ubuntu-latest
50+ steps :
51+ - name : Checkout code
52+ uses : actions/checkout@v4
53+
54+ - name : Setup environment
55+ uses : ./.github/actions/setup
56+
57+ - name : Run unit tests
58+ run : yarn test --coverage
59+
60+ - name : Upload coverage reports
61+ uses : actions/upload-artifact@v4
62+ with :
63+ name : coverage
64+ path : coverage
65+
66+ build-package :
67+ runs-on : ubuntu-latest
68+ steps :
69+ - name : Checkout code
70+ uses : actions/checkout@v4
71+
72+ - name : Setup environment
73+ uses : ./.github/actions/setup
74+
75+ - name : Build package
76+ run : yarn build
You can’t perform that action at this time.
0 commit comments