-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.23 KB
/
test-lint.yml
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
name: Test and lint
on:
pull_request:
push:
branches:
- main
merge_group:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Reconfigure git to not use auth in URLs
run: >
git config --global url."https://github.com/".insteadOf
- name: Enable corepack
run: |
corepack enable
- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
env:
COREPACK_ENABLE_STRICT: false
with:
cache-dependency-path: pnpm-lock.yaml
node-version-file: "package.json"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build generated libraries
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
max_attempts: 5
timeout_minutes: 5
command: pnpm gen
retry_on: error
- name: Run tests
run: pnpm test
- name: Run linter
run: pnpm lint .
- name: Run prettier
run: pnpm prettier --check .