-
-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (62 loc) · 1.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
name: Test & Build
on:
pull_request:
branches:
- main
env:
CI: true
jobs:
test:
name: Test and Build (${{ matrix.node_version }})
runs-on: ubuntu-22.04
strategy:
matrix:
node_version:
- 18
- 20
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js (${{ matrix.node_version }})
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
always-auth: true
- name: Restore lerna
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test & Build Package
run: |
yarn lerna run test --scope @berviantoleo/react-multi-crop
yarn lerna run build --scope @berviantoleo/react-multi-crop
- name: Try Build Docs
run: |
yarn docs
yarn lerna run docs --scope @berviantoleo/react-multi-crop
- name: Try Build Demo
run: yarn lerna run build --scope @berviantoleo/react-multi-crop-demo
env:
SKIP_PREFLIGHT_CHECK: true
PUBLIC_URL: /
# TODO; will give the docs to artifacts
- name: Cypress run
uses: cypress-io/github-action@v5
with:
start: yarn start
wait-on: 'http://localhost:3000'
working-directory: examples/demo
env:
SKIP_PREFLIGHT_CHECK: true
- name: Upload to Codecov
uses: codecov/codecov-action@v3