Skip to content

try to fix mac tests with build before testcontainer start and macos-… #859

try to fix mac tests with build before testcontainer start and macos-…

try to fix mac tests with build before testcontainer start and macos-… #859

Workflow file for this run

name: Gradle Build
on:
push:
branches:
- master
pull_request:
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest, macos-12]
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: Test on Mac
if: matrix.os == 'macos-12'
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"
./gradlew test
- name: Test on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
./gradlew test