Skip to content

Commit 69ed135

Browse files
authored
Run CI on MacOS/Windows/Ubuntu (#2883)
* Run CI on Ubuntu * Add CI job for Ubuntu * Fix codecov URL * Run CI on Windows * Run checkStyle on mutiple OS
1 parent 513b58d commit 69ed135

File tree

6 files changed

+73
-4
lines changed

6 files changed

+73
-4
lines changed

.github/workflows/checkstyle.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44
jobs:
55
lint:
66
name: Run CheckStyle
7-
runs-on: macos-latest
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macos-latest]
811
steps:
912
- uses: actions/checkout@v3
1013
with:

.github/workflows/ci-ubuntu.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit test(Ubuntu)
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Set up JDK
14+
uses: actions/setup-java@v3
15+
with:
16+
distribution: zulu
17+
java-version: 11
18+
19+
- name: Run unit tests
20+
run: sh ./build.sh
21+
22+
- name: Upload Test Reports Folder
23+
uses: actions/upload-artifact@v2
24+
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status
25+
with:
26+
name: ut-reports
27+
path: app/build/reports/tests
28+
29+
- name: Upload coverage reports to Codecov
30+
run: |
31+
curl -Os https://uploader.codecov.io/latest/linux/codecov
32+
chmod +x codecov
33+
./codecov

.github/workflows/ci-windows.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit test(Windows)
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
jobs:
8+
test:
9+
runs-on: windows-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Set up JDK
14+
uses: actions/setup-java@v3
15+
with:
16+
distribution: zulu
17+
java-version: 11
18+
19+
- name: Run unit tests
20+
run: sh ./build.sh
21+
22+
- name: Upload Test Reports Folder
23+
uses: actions/upload-artifact@v2
24+
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status
25+
with:
26+
name: ut-reports
27+
path: app/build/reports/tests
28+
29+
- name: Upload coverage reports to Codecov
30+
run: |
31+
curl -Os https://uploader.codecov.io/latest/windows/codecov
32+
chmod +x codecov
33+
./codecov

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit test
1+
name: Unit test(MacOS)
22
on:
33
push:
44
branches:

app/src/test/java/com/alphawallet/app/TransactionDecodingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void testBuildFunctionCallText() throws IOException
9494
default:
9595
break;
9696
}
97-
stringBuilder.append(transactionInput.buildFunctionCallText()).append("\n");
97+
stringBuilder.append(transactionInput.buildFunctionCallText()).append(System.lineSeparator());
9898
}
9999
}
100100
assertThat(stringBuilder.toString(), equalTo(getBaseline()));

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ buildscript {
2525
}
2626

2727
allprojects {
28-
//apply from: rootProject.file("codestyle.gradle")
28+
apply from: rootProject.file("codestyle.gradle")
2929

3030
repositories {
3131
google()

0 commit comments

Comments
 (0)