-
Notifications
You must be signed in to change notification settings - Fork 1
123 lines (102 loc) · 3.49 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_lib:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3.5.3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- run: npx pnpm install --frozen-lockfile
- run: npx pnpm build:lib
- name: Send webpack stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./packages/lib/dist/stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
build_doc:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3.5.3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- run: npx pnpm install --frozen-lockfile
- run: npx pnpm build:doc
# snyk:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3.5.3
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3.7.0
# with:
# node-version: ${{ matrix.node-version }}
# - name: Cache dependencies
# uses: actions/cache@v3
# with:
# path: ~/.pnpm-store
# key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-node-${{ matrix.node-version }}-
# - run: npx pnpm install --frozen-lockfile
# - name: snyk
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# run: npx pnpm run snyk
unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- run: npx pnpm install --frozen-lockfile
- name: test
run: npx pnpm run test:ci
- name: Codecov
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/lib/coverage
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true