ci: split jobs for unit and integration tests
All checks were successful
continuous-integration/drone/push Build is passing
CI / build (11) (push) Successful in 38s
CI / build (17) (push) Successful in 39s
CI / build-with-it (11, 1.11.12) (push) Has been skipped
CI / build-with-it (11, 1.18.0) (push) Has been skipped
CI / build-with-it (11, 1.2.0) (push) Has been skipped
CI / build-with-it (17, 1.11.12) (push) Has been skipped
CI / build-with-it (17, 1.18.0) (push) Has been skipped
CI / build-with-it (17, 1.2.0) (push) Has been skipped
CI / build-with-it (21, 1.11.12) (push) Has been skipped
CI / build-with-it (21, 1.2.0) (push) Has been skipped
CI / build-with-it (true, 21, 1.18.0) (push) Has been skipped
CI / build (true, 21) (push) Successful in 29s
All checks were successful
continuous-integration/drone/push Build is passing
CI / build (11) (push) Successful in 38s
CI / build (17) (push) Successful in 39s
CI / build-with-it (11, 1.11.12) (push) Has been skipped
CI / build-with-it (11, 1.18.0) (push) Has been skipped
CI / build-with-it (11, 1.2.0) (push) Has been skipped
CI / build-with-it (17, 1.11.12) (push) Has been skipped
CI / build-with-it (17, 1.18.0) (push) Has been skipped
CI / build-with-it (17, 1.2.0) (push) Has been skipped
CI / build-with-it (21, 1.11.12) (push) Has been skipped
CI / build-with-it (21, 1.2.0) (push) Has been skipped
CI / build-with-it (true, 21, 1.18.0) (push) Has been skipped
CI / build (true, 21) (push) Successful in 29s
This commit is contained in:
parent
4fcfa6938e
commit
7778872c63
41
.github/workflows/ci.yml
vendored
41
.github/workflows/ci.yml
vendored
@ -2,6 +2,40 @@ name: CI
|
|||||||
on: [ push, pull_request ]
|
on: [ push, pull_request ]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
if: github.ref_name != 'main' && github.base_ref != 'main' && !startsWith(github.ref_name, 'release/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
jdk: [ 11, 17, 21 ]
|
||||||
|
include:
|
||||||
|
- jdk: 21
|
||||||
|
analysis: true
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.jdk }}
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: Compile
|
||||||
|
run: ./mvnw -B clean compile
|
||||||
|
- name: Test (Unit)
|
||||||
|
run: ./mvnw -B -P coverage verify
|
||||||
|
- name: Analysis
|
||||||
|
if: matrix.analysis && env.SONAR_TOKEN != ''
|
||||||
|
run: >
|
||||||
|
./mvnw -B sonar:sonar
|
||||||
|
-Dsonar.host.url=https://sonarcloud.io
|
||||||
|
-Dsonar.organization=stklcode-github
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
||||||
|
build-with-it:
|
||||||
|
if: github.ref_name == 'main' || github.base_ref == 'main' || startsWith(github.ref_name, 'release/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -24,7 +58,6 @@ jobs:
|
|||||||
- name: Compile
|
- name: Compile
|
||||||
run: ./mvnw -B clean compile
|
run: ./mvnw -B clean compile
|
||||||
- name: Set up Vault
|
- name: Set up Vault
|
||||||
if: github.ref_name == 'main' || github.base_ref == 'main' || startsWith(github.ref_name, 'release/')
|
|
||||||
run: |
|
run: |
|
||||||
wget -q "https://releases.hashicorp.com/vault/${{ matrix.vault }}/vault_${{ matrix.vault }}_linux_amd64.zip"
|
wget -q "https://releases.hashicorp.com/vault/${{ matrix.vault }}/vault_${{ matrix.vault }}_linux_amd64.zip"
|
||||||
wget -q -O - "https://releases.hashicorp.com/vault/${{ matrix.vault }}/vault_${{ matrix.vault }}_SHA256SUMS" | grep linux_amd64 | sha256sum -c
|
wget -q -O - "https://releases.hashicorp.com/vault/${{ matrix.vault }}/vault_${{ matrix.vault }}_SHA256SUMS" | grep linux_amd64 | sha256sum -c
|
||||||
@ -34,15 +67,11 @@ jobs:
|
|||||||
sudo mv "$tmp/vault" /usr/bin/vault
|
sudo mv "$tmp/vault" /usr/bin/vault
|
||||||
rm -rf "$tmp"
|
rm -rf "$tmp"
|
||||||
- name: Test (Unit & Integration)
|
- name: Test (Unit & Integration)
|
||||||
if: github.ref_name == 'main'|| github.base_ref == 'main' || startsWith(github.ref_name, 'release/')
|
|
||||||
env:
|
env:
|
||||||
VAULT_VERSION: ${{ matrix.vault }}
|
VAULT_VERSION: ${{ matrix.vault }}
|
||||||
run: ./mvnw -B -P coverage -P integration-test verify
|
run: ./mvnw -B -P coverage -P integration-test verify
|
||||||
- name: Test (Unit)
|
|
||||||
if: github.ref_name != 'main' && github.base_ref != 'main' && !startsWith(github.ref_name, 'release/')
|
|
||||||
run: ./mvnw -B -P coverage verify
|
|
||||||
- name: Analysis
|
- name: Analysis
|
||||||
if: matrix.analysis
|
if: matrix.analysis && env.SONAR_TOKEN != ''
|
||||||
run: >
|
run: >
|
||||||
./mvnw -B sonar:sonar
|
./mvnw -B sonar:sonar
|
||||||
-Dsonar.host.url=https://sonarcloud.io
|
-Dsonar.host.url=https://sonarcloud.io
|
||||||
|
Loading…
x
Reference in New Issue
Block a user