Skip to content

Commit

Permalink
add GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis committed Nov 15, 2020
1 parent ae656e8 commit 08b5a5e
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/cross-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Cross-Version

on: [push, pull_request]

jobs:

test_java:
name: Java ${{ matrix.java }}
strategy:
fail-fast: false
matrix:
java: [14, 15, 16-ea]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Test
run: ./mvnw -V --no-transfer-progress -e clean verify javadoc:javadoc
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on: [push, pull_request]

jobs:

test_os:
name: OS ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Test
run: ./mvnw -V --no-transfer-progress -e clean verify javadoc:javadoc

sonar:
name: Sonar code analysis
runs-on: ubuntu-latest
if: github.repository == 'assertj/assertj-core' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Test with Sonar
run: >
./mvnw -V --no-transfer-progress -e clean verify javadoc:javadoc
org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=assertj
-Dsonar.projectKey=joel-costigliola_assertj-core
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit 08b5a5e

Please sign in to comment.