Skip to content

Commit

Permalink
[issues-1313] - CI: Use GitHub actions for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Sep 24, 2024
1 parent b363ee2 commit e0e477c
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
- 'doc/**'
- '.circleci/**'
env:
# failsafe.groups configuration depends on the env setup.
FAILSAFE_GROUPS: ''
DOCKER_HOST: 'unix:///var/run/docker.sock'

jobs:
Expand All @@ -23,9 +21,12 @@ jobs:
fail-fast: false
matrix:
java: ['11']

target: ['docker', 'kubernetes']
env:
# failsafe.groups configuration depends on the env setup.
FAILSAFE_GROUPS: ''
steps:
- name: Setup Minikube
- name: Setup Minikube # add an if for the kubernetes target only?
uses: manusa/[email protected]
with:
driver: docker
Expand All @@ -34,8 +35,6 @@ jobs:
kubernetes version: 'v1.30.0'
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--memory='4gb' --cpus='2'"
env:
FAILSAFE_GROUPS: "-Dfailsafe.groups=\"org.arquillian.cube.docker.impl.requirement.RequiresDocker,org.arquillian.cube.kubernetes.impl.requirement.RequiresKubernetes\""
- name: Enable minikube registry
run: |
minikube addons enable registry
Expand All @@ -55,10 +54,15 @@ jobs:
distribution: 'adopt'
- name: Maven pre-fetch dependencies ${{ matrix.java }}
run: |
./mvnw verify -q -U -DskipTests # pre-fetch dependencies
- name: Build with Maven Java ${{ matrix.java }}
./mvnw clean package -q -U -DskipTests # pre-fetch dependencies
- name: Build and run integration tests for Docker target (${{ matrix.java }})
if: ${{ matrix.target == 'docker' }}
run: |
./mvnw package -Dfailsafe.groups=org.arquillian.cube.docker.impl.requirement.RequiresDocker -Dcontainerless.skip.tests=true
- name: Build and run integration tests for Kubernetes target (${{ matrix.java }})
if: ${{ matrix.target == 'kubernetes' }}
run: |
./mvnw -fae clean package ${{ env.FAILSAFE_GROUPS }}
./mvnw verify -Dfailsafe.groups=org.arquillian.cube.kubernetes.impl.requirement.RequiresKubernetes -Dcontainerless.skip.tests=true
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down

0 comments on commit e0e477c

Please sign in to comment.