Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

pr.yml

115 lines3.5 KB

1name: pr
2on: [pull_request]
3env:
4 NX_DAEMON: false
5 NX_VERBOSE_LOGGING: true
6 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
7jobs:
8 test:
9 name: 'Test'
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v3
13 with:
14 fetch-depth: 0
15 ref: ${{ github.head_ref }}
16 repository: ${{github.event.pull_request.head.repo.full_name}}
17 - uses: pnpm/action-setup@v2.2.4
18 with:
19 version: 8
20 - uses: actions/setup-node@v3
21 with:
22 node-version: 18.15.0
23 cache: 'pnpm'
24 - name: Install dependencies
25 run: pnpm --prefer-offline install --no-frozen-lockfile
26 - name: Run Tests
27 uses: nick-fields/retry@v2.8.3
28 with:
29 command: pnpm test:lib --base=${{ github.event.pull_request.base.sha }}
30 timeout_minutes: 5
31 max_attempts: 3
32 - name: Upload coverage to Codecov
33 uses: codecov/codecov-action@v3
34 lint:
35 name: 'Lint'
36 runs-on: ubuntu-latest
37 steps:
38 - uses: actions/checkout@v3
39 with:
40 fetch-depth: 0
41 ref: ${{ github.head_ref }}
42 repository: ${{github.event.pull_request.head.repo.full_name}}
43 - uses: pnpm/action-setup@v2.2.4
44 with:
45 version: 7
46 - uses: actions/setup-node@v3
47 with:
48 node-version: 16.14.2
49 cache: 'pnpm'
50 - name: Install dependencies
51 run: pnpm --prefer-offline install --no-frozen-lockfile
52 - run: pnpm run test:eslint --base=${{ github.event.pull_request.base.sha }}
53 typecheck:
54 name: 'Typecheck'
55 runs-on: ubuntu-latest
56 steps:
57 - uses: actions/checkout@v3
58 with:
59 fetch-depth: 0
60 ref: ${{ github.head_ref }}
61 repository: ${{github.event.pull_request.head.repo.full_name}}
62 - uses: pnpm/action-setup@v2.2.4
63 with:
64 version: 7
65 - uses: actions/setup-node@v3
66 with:
67 node-version: 16.14.2
68 cache: 'pnpm'
69 - name: Install dependencies
70 run: pnpm --prefer-offline install --no-frozen-lockfile
71 - run: pnpm run test:types --base=${{ github.event.pull_request.base.sha }}
72 format:
73 name: 'Format'
74 runs-on: ubuntu-latest
75 steps:
76 - uses: actions/checkout@v3
77 with:
78 fetch-depth: 0
79 ref: ${{ github.head_ref }}
80 repository: ${{github.event.pull_request.head.repo.full_name}}
81 - uses: pnpm/action-setup@v2.2.4
82 with:
83 version: 7
84 - uses: actions/setup-node@v3
85 with:
86 node-version: 16.14.2
87 cache: 'pnpm'
88 - name: Install dependencies
89 run: pnpm --prefer-offline install --no-frozen-lockfile
90 - run: pnpm run test:format --base=${{ github.event.pull_request.base.sha }}
91 test-build:
92 name: 'Test Build'
93 runs-on: ubuntu-latest
94 steps:
95 - uses: actions/checkout@v3
96 with:
97 fetch-depth: 0
98 ref: ${{ github.head_ref }}
99 repository: ${{github.event.pull_request.head.repo.full_name}}
100 - uses: pnpm/action-setup@v2.2.4
101 with:
102 version: 7
103 - uses: actions/setup-node@v3
104 with:
105 node-version: 16.14.2
106 cache: 'pnpm'
107 - name: Install dependencies
108 run: pnpm --prefer-offline install --no-frozen-lockfile
109 - name: Get appropriate base and head commits for `nx affected` commands
110 uses: nrwl/nx-set-shas@v3
111 with:
112 main-branch-name: 'main'
113 - run: pnpm run test:build
114 env:
115 BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}