-
Notifications
You must be signed in to change notification settings - Fork 4
93 lines (74 loc) · 2.22 KB
/
check.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
name: Reader.js CI (Lint & Test)
on:
push:
paths:
- .github/workflows/check.yml
- src/**
env:
NODE_VERSION: 18
jobs:
run-lint:
name: Run lint
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up node_modules cache
uses: actions/cache@v2
id: node-cache
with:
path: 'node_modules'
key: ${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }} }}
- name: Install node packages
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Run lint
run: yarn lint
run-test:
name: Run test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up node_modules cache
uses: actions/cache@v2
id: node-cache
with:
path: 'node_modules'
key: ${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }} }}
- name: Install node packages
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Checkout test repo
uses: actions/checkout@v2
with:
repository: ridi/Reader.js-TTS-Unit-Test
ref: feature/v2
ssh-key: ${{ secrets.TEST_ACCESS_PRIVATE_KEY }}
path: tests
- name: Install node packages in tests
working-directory: tests
run: yarn install --frozen-lockfile
- name: Set up reader.js
working-directory: tests
run: cp -rf ../dist/** node_modules/@ridi/reader.js
- name: Run android test
working-directory: tests
run: |
head -1 node_modules/@ridi/reader.js/android/index.js
grunt --platform=android
- name: Run ios test
working-directory: tests
run: |
head -1 node_modules/@ridi/reader.js/ios/index.js
grunt --platform=ios