-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from riemann/ghact
Added GitHub Actions workflow
- Loading branch information
Showing
2 changed files
with
74 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Riemann Clojure Client testing | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
|
||
strategy: | ||
matrix: | ||
java: [ '8', '11', '13', '15', '16', '17' ] | ||
name: Java ${{ matrix.Java }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
services: | ||
riemann: | ||
image: riemannio/riemann:latest | ||
ports: | ||
- 5555:5555 | ||
- 5555:5555/udp | ||
- 5556:5556 | ||
- 2003:2003 | ||
|
||
env: | ||
JVM_OPTS: -Xmx3200m | ||
LEIN_ROOT: nbd | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: ${{ matrix.java }} | ||
- name: Install clojure tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.10.1.693 # Clojure CLI based on tools.deps | ||
lein: 2.9.1 # Leiningen | ||
- name: Install deps | ||
run: lein deps | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ matrix.java }}-maven-${{ hashFiles('**/project.clj') }} | ||
- name: Run test2junit | ||
run: lein test2junit | ||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Test Results (Java ${{ matrix.java }}) | ||
path: target/test2junit/ | ||
|
||
publish-test-results: | ||
name: "Publish Tests Results" | ||
needs: test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
if: always() | ||
|
||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
|
||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
with: | ||
files: "artifacts/**/*.xml" |