Skip to content

Commit

Permalink
Add Github actions (#50)
Browse files Browse the repository at this point in the history
* Initial commit of Github actions.

* Remove Windows build and try to fix Sonar path

* Remove travis build.
  • Loading branch information
nickrobison-usds authored Jan 28, 2021
1 parent 238137d commit 0b3e744
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 49 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and test
on:
workflow_dispatch: # because sometimes you just want to force a branch to have tests run
pull_request:
branches:
- "**"
push:
branches:
- main

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
java-version:
- 11
- 1.8
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Disable shallow clones so Sonar can have all the data
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Run Java Tests
run: mvn test
- name: Sonar analysis
run: mvn sonar:sonar -Dsonar.projectKey=jmacaroons -Dsonar.organization=nickrobison-usds -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java-version == '11' }}
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

0 comments on commit 0b3e744

Please sign in to comment.