-
Notifications
You must be signed in to change notification settings - Fork 87
61 lines (58 loc) · 1.72 KB
/
elkjs.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
# To verify that changes of a PR do not break elkjs.
name: elkjs
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# We check against LTSs supported by GWT
# 8 - LTS
# 11 - LTS
java-version: [ 11 ]
node-version: [ 12.x ]
steps:
# Checkout the repository of both elk and elkjs, place them next to each other.
- uses: actions/checkout@v2
with:
path: elk
- uses: actions/checkout@v2
with:
repository: kieler/elkjs
path: elkjs
# Prepare and use caches for both gradle and npm.
- name: Cache gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-node-
# elkjs (or rather GWT) requires Java 1.8
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Grant execute permission for gradlew
run: chmod +x $GITHUB_WORKSPACE/elkjs/gradlew
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# Finally build elkjs and run its tests
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
working-directory: /home/runner/work/elk/elk/elkjs/
env:
CI: true