-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathaction.yml
73 lines (58 loc) · 1.95 KB
/
action.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
name: Test
description: Lint, Test and upload to Codecov
inputs:
github_token:
description: GitHub token
required: true
chromatic_token:
description: Chromatic token
required: true
runs:
using: composite
steps:
# - name: Commitlint
# shell: bash
# run: npx --no-install commitlint --from=last-release
- name: Lint
shell: bash
run: npx nx run-many -t lint --exclude website # --base=last-release <- add that back after fix
- name: Build packages
shell: bash
run: npx nx run-many -t build --parallel=false --exclude website # --base=last-release <- add that back
# - name: Build storybook
# shell: bash
# run: npx nx build-storybook headless
- name: Test all except headless
shell: bash
run: npx nx run-many -t test # --base=last-release <- add that back
env:
NODE_OPTIONS: --experimental-vm-modules
- name: Test Headless
uses: cypress-io/github-action@v5
with:
command: 'pnpm test.headless.ci'
- name: Run Visual Tests
shell: bash
run: 'pnpm test.headless.visual'
# - name: Publish to Chromatic
# uses: chromaui/action@v1
# # Chromatic GitHub Action options
# with:
# # 👇 Chromatic projectToken, refer to the manage page to obtain it.
# projectToken: ${{ inputs.chromatic_token }}
# storybookBuildDir: dist/storybook/headless
# zip: true
# - name: Build
# shell: bash
# run: npx nx affected:build --base=last-release --exclude=website
# - name: E2E Tests
# shell: bash
# run: npx nx affected --target=e2e --base=last-release
# - name: Codecov upload
# uses: codecov/codecov-action@v2
# - name: Lint PR
# if: github.event_name == 'pull_request'
# shell: bash
# run: pnpm danger ci --use-github-checks --failOnErrors -d .dangerfile.ts
# env:
# DANGER_GITHUB_API_TOKEN: ${{ inputs.github_token }}