-
Notifications
You must be signed in to change notification settings - Fork 6
79 lines (79 loc) · 2.75 KB
/
test.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
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
name: "Test"
on:
push:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-test-env
- name: Build all packages (so they can require each other)
run: pnpm build
- name: Test
run: pnpm test
- name: Build example package
run: pnpm --filter=blog-example build-vite
test-cypress:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-test-env
- name: Build all packages (so they can require each other)
run: pnpm build
- name: Cypress info
run: pnpm exec cypress info
- name: Run cypress tests
run: pnpm --filter=react exec cypress run --component --env JS_CLIENTS_TEST_API_KEY=${{secrets.CYPRESS_JS_CLIENTS_TEST_API_KEY}}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-test-env
- name: Build all packages (so they can require each other)
run: pnpm build
- name: Lint
run: pnpm lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-test-env
- name: Build all packages (so they can require each other)
run: pnpm build
- name: Typecheck
run: pnpm typecheck
versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-test-env
- name: Check dependency versions
run: pnpm check-dependency-versions
bundle-sizes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-test-env
- name: Build all packages (so they can require each other)
run: pnpm build
- name: Build test bundles
run: pnpm -F=test-bundles test-build
- name: Send imperative bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./packages/test-bundles/dist/api-read-webpack-stats.json
key: ${{ secrets.RELATIVE_CI_IMPERATIVE_CLIENT_BUNDLE_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Send react bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./packages/test-bundles/dist/react-read-webpack-stats.json
key: ${{ secrets.RELATIVE_CI_REACT_BUNDLE_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Send shopify bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./packages/test-bundles/dist/shopify-read-webpack-stats.json
key: ${{ secrets.RELATIVE_CI_SHOPIFY_BUNDLE_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}