-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (51 loc) · 1.43 KB
/
package-ci.yml
File metadata and controls
54 lines (51 loc) · 1.43 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
name: "Package CI"
permissions:
statuses: write
checks: write
contents: read
on:
push:
pull_request:
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Restore Node.js dependencies
run: yarn install --immutable
- name: Restore package.json
# This step is necessary because the previous step may have updated package.json
run: git checkout -- package.json packages/*/package.json
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
working-directory: ./packages/browser-sdk
- id: build
name: Build the project
run: yarn build
- name: Build docs
run: yarn docs
- id: test
name: Test the project
run: yarn test:ci
- name: Report test results
uses: dorny/test-reporter@v1.6.0
with:
name: Build & Test Report
path: ./packages/*/junit.xml
reporter: jest-junit
- id: fmt
name: Check formatting
run: yarn fmt
- id: lint
name: Check for linting errors
run: yarn lint:ci