-
Notifications
You must be signed in to change notification settings - Fork 11
67 lines (63 loc) · 1.94 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
jobs:
prepare-yarn-cache:
name: Prepare Cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('yarn.lock') }}
- name: Check Yarn dedupe
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn dedupe --check
- name: Check or update Yarn cache
env:
YARN_ENABLE_SCRIPTS: false
YARN_NODE_LINKER: pnp
run: |
yarn install --immutable --mode=skip-build
- name: Publish packages
run: yarn publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
build:
name: Build Packages
runs-on: ubuntu-latest
needs: prepare-yarn-cache
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: |
yarn install --immutable --mode=skip-build
yarn ./nm-packages/engine.dashboard install --immutable --mode=skip-build
- name: Build
run: |
yarn ./packages/engine.utils run build
yarn build --exclude @c11/engine.utils
- name: Test
run: yarn test
- name: Upload coverage report
uses: codecov/codecov-action@v1