-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (57 loc) · 1.66 KB
/
test.yml
File metadata and controls
72 lines (57 loc) · 1.66 KB
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
name: js
on:
push:
branches: [ main, v* ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
repository: interscript/interscript
- name: Run bootstrap script
run: ruby bootstrap.rb
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Cache Ruby gems
uses: actions/cache@v2
env:
cache-name: cache-ruby-modules
with:
path: vendor/bundle
key: ${{ runner.os }}-ruby-2.7-gems-${{ hashFiles('**/interscript.gemspec') }}
restore-keys: |
${{ runner.os }}-ruby-2.7-gems-
- name: Configure bundle to use vendor mode
run: bundle config path vendor/bundle
- name: Install bundle
working-directory: ./ruby
run: |
bundle install --jobs 4 --retry 3 --with jsexec --without secryst
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM packages
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-version-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-version-
- name: Install NPM packages
working-directory: ./js
run: npm install
- name: Run prepareMaps
working-directory: ./js
run: npm run prepareMaps
- name: Run tests
working-directory: ./js
run: npm test