Skip to content

Commit

Permalink
ci : E2E tests should also run on GitHub MacOS runners
Browse files Browse the repository at this point in the history
+ Enable E2E tests to run on GitHub MacOS runners
+ Use `crazy-max/ghaction-setup-docker` action to set up docker on MacOS

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed Feb 11, 2024
1 parent f3e5b22 commit 3d893c3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
- name: Install DMP
run: mvn ${MAVEN_ARGS} clean install -DskipTests -Djacoco.skip=true

build:
linux-build:
name: Docker ${{ matrix.docker }} on Linux
runs-on: ubuntu-latest
needs: buildWithoutTests
strategy:
fail-fast: false
matrix:
docker: [v25.0.2, v24.0.9, v23.0.6]
docker: [v25.0.2, v24.0.9, v23.0.6, v20.10.24]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -62,5 +62,42 @@ jobs:
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: [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@v2
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/.colima/default/docker.sock
cd it/
mvn clean install
2 changes: 1 addition & 1 deletion .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: E2E Windows

env:
MAVEN_ARGS: -B -C -V -ntp -Dhttp.keepAlive=false -e
Expand Down
1 change: 1 addition & 0 deletions it/multi-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<run>
<wait>
<log>Hello from Spring Boot!</log>
<time>30000</time>
</wait>
</run>
</image>
Expand Down

0 comments on commit 3d893c3

Please sign in to comment.