ci : fix failing sonar and E2E macOS github action workflows (#1839) #1084
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: E2E Tests | |
env: | |
MAVEN_ARGS: -B -C -V -ntp -Dhttp.keepAlive=false -e | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 1 * * *' # Every day at 1 | |
concurrency: | |
# Only run once for latest commit per ref and cancel other (previous) runs. | |
group: ci-e2e-docker-maven-plugin-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
buildWithoutTests: | |
name: BuildWithoutTests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache .m2 registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: cache-e2e-${{ github.sha }}-${{ github.run_id }} | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Install DMP | |
run: mvn ${MAVEN_ARGS} clean install -DskipTests -Djacoco.skip=true | |
linux-build: | |
name: Linux | |
runs-on: ubuntu-latest | |
needs: buildWithoutTests | |
strategy: | |
fail-fast: false | |
matrix: | |
docker: [v27.1.1, v26.1.4, v25.0.2, v24.0.9, v23.0.6, v20.10.24] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Cache .m2 registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: cache-e2e-${{ github.sha }}-${{ github.run_id }} | |
- name: Set up Docker | |
uses: crazy-max/ghaction-setup-docker@v3 | |
with: | |
version: ${{ matrix.docker }} | |
- name: Run Integration tests | |
run: | | |
# Workaround for https://github.com/docker/for-linux/issues/748 | |
DOCKER_INSTALL_PATH=`which docker` | |
sudo cp $DOCKER_INSTALL_PATH-init /sbin/docker-init | |
cd it/ | |
mvn clean install | |
macos-build: | |
name: MacOS | |
needs: buildWithoutTests | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
docker: [v27.1.1, v26.1.4, v25.0.2, v24.0.9, v23.0.6, v20.10.24] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Cache .m2 registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: cache-e2e-${{ github.sha }}-${{ github.run_id }} | |
- # https://github.com/crazy-max/ghaction-setup-docker/issues/108 | |
name: Install QEMU 9.0.2 | |
uses: docker/actions-toolkit/.github/actions/macos-setup-qemu@19ca9ade20f5da695f76a10988d6532058575f82 | |
- name: Set up Docker | |
uses: crazy-max/ghaction-setup-docker@v3 | |
with: | |
version: ${{ matrix.docker }} | |
- name: Set up Docker Buildx | |
run: | | |
brew install docker-buildx | |
mkdir -p ~/.docker/cli-plugins | |
ln -sfn /usr/local/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx | |
- name: Run Integration tests | |
run: | | |
export DOCKER_HOST=unix:///Users/runner/.lima/docker-actions-toolkit/docker.sock | |
cd it/ | |
mvn clean install |