-
Notifications
You must be signed in to change notification settings - Fork 267
98 lines (89 loc) · 2.67 KB
/
build_and_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
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
name: Build and Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
container:
image: openjdk:8-jdk
env:
_JAVA_OPTIONS: "-Xmx3G -Xms2G"
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v2
- name: Setup System Tools
run: |
apt update -y
apt install -y gnupg2 curl
- name: Install Node.js
run: |
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs
- name: Check Node.js version
run: node --version
- name: Verify files
run: |
curl -sSL https://secchannel.rsk.co/SUPPORT.asc | gpg2 --import -
gpg2 --verify SHA256SUMS.asc && sha256sum --check SHA256SUMS.asc
- name: List Files in gradle Directory
run: ls -al gradle && ls -al gradle/wrapper
- uses: actions/cache@v3
name: Cache Gradle
with:
path: |
.gradle/caches
gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', 'gradle/**/*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: |
./configure.sh
./gradlew --no-daemon dependencies
./gradlew --no-daemon --stacktrace build -x test
ls -la ./gradle/wrapper/gradle-wrapper.jar
rskj-unit-tests:
needs: build
runs-on: ubuntu-latest
container:
image: openjdk:8-jdk
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v2
- name: Setup System Tools
run: |
apt update -y
apt install -y curl
- name: Install Node.js
run: |
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs
- name: Check Node.js version
run: node --version
- uses: actions/cache@v3
name: Restore gradle cache
with:
path: |
.gradle/caches
gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', 'gradle/**/*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Check Working Directory
run: pwd
- name: List Files in Current Directory
run: ls -al
- name: List Files in gradle Directory
run: ls -al gradle && ls -al gradle/wrapper
- name: rskj tests
run: |
chmod +x ./gradlew
./gradlew --no-daemon --stacktrace test
- name: Save test results
run: |
mkdir -p ~/junit/
find rskj-core/build/test-results -type f -name "*.xml" -exec cp {} ~/junit/ \;
if: always()