-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (50 loc) · 1.44 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
name: Test & Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build_core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/dependencies-install
- run: yarn nx run-many --target=build --projects=elements* --exclude=*-example
# Build caches for (canary) release workflow
- if: github.ref == 'refs/heads/master'
name: Upload build artifacts for canary release
uses: ./.github/workflows/artifacts-upload
with:
upload-core-artifacts: true
test:
needs:
- build_core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/dependencies-install
- run: yarn lint
- run: yarn build:core
- run: yarn test
build_dependent:
runs-on: ubuntu-latest
needs:
- build_core
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/dependencies-install
- run: yarn nx run-many --target=build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifacts
uses: ./.github/workflows/artifacts-upload
with:
upload-example-artifacts: ${{ github.ref == 'refs/heads/master' }}
upload-storybook-artifact: true
unicorn:
needs:
- test
- build_dependent
uses: ./.github/workflows/deploy-unicorn.yml