try to fix flaky mac testcontainer stuff #786
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: Gradle Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
gradle: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'gradle' | |
- uses: gradle/gradle-build-action@v3 | |
- name: Setup docker (missing on MacOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install docker | |
colima start --network-address | |
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock | |
export TESTCONTAINERS_HOST_OVERRIDE=$(colima ls -j | jq -r '.address') | |
export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock" | |
- name: Test | |
run: | | |
./gradlew test |