Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ jobs:
- uses: actions/checkout@v3
- id: set-matrix
run: |
matrix=$( cat k8s-versions.json | jq '{version: [keys[] as $k | .[$k].versions[] | .k8s as $v | "\($k) \($v)"]}' -c )
# Full matrix
# ubuntu_versions=$( cat k8s-versions.json | jq '{version: [keys[] as $k | .[$k].versions[] | .k8s as $v | "\($k) \($v)"], os: ["ubuntu-latest"]}' -c )
# macos_versions=$(cat k8s-versions.json | jq '{ version: [to_entries[] as $k | "\($k.key) \($k.value.versions[-1].k8s)"]}')
# matrix=$( echo $ubuntu_versions | jq --argjson macos_versions "$(echo -n $macos_versions)" '.os as $os | .version as $version | {version: $version, os: $os, include: [{version: $macos_versions.version, os: "macos-13"}]}' -c )

# echo $matrix
# echo "::set-output name=matrix::$matrix"

# MacOs Single Test
matrix=$( echo '{"version":["ApiServerContainer 1.30.0"],"os":["macos-12"]}' | jq -c '.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cmoulliard, thanks almost forgot this PR. I will provide an update here within the next week.


echo $matrix
echo "::set-output name=matrix::$matrix"

Expand All @@ -30,11 +40,24 @@ jobs:
echo $matrix | jq .

build:
runs-on: ubuntu-latest
needs: matrix
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
steps:
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
brew install docker colima docker-buildx
colima start --network-address
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use colima and not podman ?

colima ls
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock

echo "TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock" >> $GITHUB_ENV
echo "TESTCONTAINERS_HOST_OVERRIDE=$(colima ls -j | jq -r '.address')" >> $GITHUB_ENV
# echo "DOCKER_HOST=unix://${HOME}/.colima/default/docker.sock" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ test {
systemProperty "kubernetes.disable.autoConfig", "true"

environment 'TESTCONTAINERS_REUSE_ENABLE', 'true'
environment 'CONTAINER_FILTER', System.getenv("CONTAINER_FILTER")

if(System.getenv("CONTAINER_FILTER")) {
environment 'CONTAINER_FILTER', System.getenv("CONTAINER_FILTER")
}

useJUnitPlatform()

Expand Down