Merge pull request #1323 from smallrye/issue-1316 #507
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
--- | |
name: Main branch continuous integration and snapshots deployment | |
on: | |
push: | |
branches: | |
- "main" | |
concurrency: | |
group: "ci-cd-${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
java: [ | |
{ 'version': '11', opts: '' }, | |
{ 'version': '17', 'opts': '' }, | |
{ 'version': '20', 'opts': '' } | |
] | |
name: Build with Java ${{ matrix.java.version }} (OpenJDK) | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
name: set up jdk ${{matrix.java.version}} | |
with: | |
distribution: temurin | |
java-version: ${{matrix.java.version}} | |
cache: maven | |
- name: Build with Maven | |
env: | |
MAVEN_OPTS: ${{ matrix.java.opts }} | |
run: ./mvnw -s .build/maven-ci-settings.xml -B clean verify | |
snapshot: | |
name: Deploy snapshots | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: maven | |
- name: Deploy snapshots | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SECRET_FILES_PASSPHRASE: ${{ secrets.SECRET_FILES_PASSPHRASE }} | |
run: | | |
.build/decrypt-secrets.sh | |
.build/deploy-snapshot.sh | |
quality-and-compatibility: | |
name: Test coverage and compatibility checks | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: maven | |
- name: Compatibility checks | |
run: ./mvnw -s .build/maven-ci-settings.xml -pl '!bom' -B install revapi:check@check-compatibility -DskipTests -fae | |
- name: Test coverage | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./mvnw -s .build/maven-ci-settings.xml verify -Pcoverage | |
- name: Codecov | |
uses: codecov/[email protected] |