Skip to content

Commit

Permalink
Run CI on MacOS/Windows/Ubuntu (#2883)
Browse files Browse the repository at this point in the history
* Run CI on Ubuntu
* Add CI job for Ubuntu
* Fix codecov URL
* Run CI on Windows
* Run checkStyle on mutiple OS
  • Loading branch information
seabornlee committed Oct 28, 2022
1 parent 513b58d commit 69ed135
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ on:
jobs:
lint:
name: Run CheckStyle
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/ci-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit test(Ubuntu)
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11

- name: Run unit tests
run: sh ./build.sh

- name: Upload Test Reports Folder
uses: actions/upload-artifact@v2
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status
with:
name: ut-reports
path: app/build/reports/tests

- name: Upload coverage reports to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
33 changes: 33 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit test(Windows)
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11

- name: Run unit tests
run: sh ./build.sh

- name: Upload Test Reports Folder
uses: actions/upload-artifact@v2
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status
with:
name: ut-reports
path: app/build/reports/tests

- name: Upload coverage reports to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/windows/codecov
chmod +x codecov
./codecov
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit test
name: Unit test(MacOS)
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void testBuildFunctionCallText() throws IOException
default:
break;
}
stringBuilder.append(transactionInput.buildFunctionCallText()).append("\n");
stringBuilder.append(transactionInput.buildFunctionCallText()).append(System.lineSeparator());
}
}
assertThat(stringBuilder.toString(), equalTo(getBaseline()));
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ buildscript {
}

allprojects {
//apply from: rootProject.file("codestyle.gradle")
apply from: rootProject.file("codestyle.gradle")

repositories {
google()
Expand Down

0 comments on commit 69ed135

Please sign in to comment.