-
Notifications
You must be signed in to change notification settings - Fork 10
108 lines (88 loc) · 2.65 KB
/
ci.yml
File metadata and controls
108 lines (88 loc) · 2.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
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
102
103
104
105
106
107
108
name: CI
on: [push, pull_request]
env:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CI: true
CSC_KEY_PASSWORD: ${{ secrets.MACOSDEVELOPERCERTIFICATE_PASSWORD }}
CSC_LINK: ${{ secrets.MACOSDEVELOPERCERTIFICATE_BASE64 }}
CSC_FOR_PULL_REQUEST: true
FORCE_COLOR: 3
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: Test and build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [24.x]
os: [macOS-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: System info (macOS)
if: matrix.os == 'macOS-latest'
run: sw_vers
- name: System info (Windows)
if: matrix.os == 'windows-latest'
run: systeminfo
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint styles
run: npm run lint:styles
- name: Lint scripts
run: npm run lint -- --quiet
- name: Check Typescript
run: npm run tsc
- name: Unit test
run: npm test
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: E2E test
run: npm run test:e2e
- name: Save Playwright results
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: playwright-${{ matrix.os }}
path: |
tests/playwright/test-results/
tests/playwright/playwright-report/
- name: Build
run: npm run build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: |
build/
!build/*-mac.zip
!build/*-mac.zip.blockmap
!build/mac-arm64/
release:
name: Release for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main'
needs: test
strategy:
matrix:
node-version: [24.x]
os: [macOS-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Release
run: npm run release