Skip to content

Commit 08b5a5e

Browse files
committed
add GitHub Actions CI
1 parent ae656e8 commit 08b5a5e

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

.github/workflows/cross-version.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Cross-Version
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
test_java:
8+
name: Java ${{ matrix.java }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
java: [14, 15, 16-ea]
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup Java
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: ${{ matrix.java }}
20+
- name: Cache Maven Repository
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.m2
24+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: ${{ runner.os }}-maven
26+
- name: Test
27+
run: ./mvnw -V --no-transfer-progress -e clean verify javadoc:javadoc

.github/workflows/main.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
test_os:
8+
name: OS ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ubuntu-latest, macOS-latest, windows-latest]
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup Java
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 11
20+
- name: Cache Maven Repository
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.m2
24+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: ${{ runner.os }}-maven
26+
- name: Test
27+
run: ./mvnw -V --no-transfer-progress -e clean verify javadoc:javadoc
28+
29+
sonar:
30+
name: Sonar code analysis
31+
runs-on: ubuntu-latest
32+
if: github.repository == 'assertj/assertj-core' && github.event_name == 'push'
33+
steps:
34+
- uses: actions/checkout@v2
35+
with:
36+
fetch-depth: 0
37+
- name: Setup Java
38+
uses: actions/setup-java@v1
39+
with:
40+
java-version: 11
41+
- name: Cache Maven Repository
42+
uses: actions/cache@v2
43+
with:
44+
path: ~/.m2
45+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
46+
restore-keys: ${{ runner.os }}-maven
47+
- name: Test with Sonar
48+
run: >
49+
./mvnw -V --no-transfer-progress -e clean verify javadoc:javadoc
50+
org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar
51+
-Dsonar.host.url=https://sonarcloud.io
52+
-Dsonar.organization=assertj
53+
-Dsonar.projectKey=joel-costigliola_assertj-core
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)