diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 97b8c4d91c..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,145 +0,0 @@ -# This file is autogenerated by the 'modulegen' tool. -# Please update the 'ci.yml' template instead. -name: Main pipeline - -on: - push: - branches: - - main - paths-ignore: - - '.vscode/**' - - 'mkdocs.yml' - - 'docs/**' - - 'README.md' - pull_request: - paths-ignore: - - '.vscode/**' - - 'mkdocs.yml' - - 'docs/**' - - 'README.md' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} - cancel-in-progress: true - -jobs: - test: - strategy: - matrix: - go-version: [1.21.x, 1.x] - platform: [ubuntu-latest, macos-latest] - uses: ./.github/workflows/ci-test-go.yml - with: - go-version: ${{ matrix.go-version }} - fail-fast: true - platform: ${{ matrix.platform }} - project-directory: "." - rootless-docker: false - run-tests: ${{ matrix.platform == 'ubuntu-latest' }} - ryuk-disabled: false - - # The job below is a copy of the job above, but with ryuk disabled. - # It's executed in the first stage to avoid concurrency issues. - test-reaper-off: - name: "Test with reaper off" - strategy: - matrix: - go-version: [1.21.x, 1.x] - uses: ./.github/workflows/ci-test-go.yml - with: - go-version: ${{ matrix.go-version }} - fail-fast: false - platform: "ubuntu-latest" - project-directory: "." - rootless-docker: false - run-tests: true - ryuk-disabled: true - - # The job below is a copy of the job above, but with Docker rootless. - # It's executed in the first stage to avoid concurrency issues. - test-rootless-docker: - name: "Test with Rootless Docker" - strategy: - matrix: - go-version: [1.21.x, 1.x] - platform: [ubuntu-latest] - uses: ./.github/workflows/ci-test-go.yml - with: - go-version: ${{ matrix.go-version }} - fail-fast: false - platform: "ubuntu-latest" - project-directory: "." - rootless-docker: true - run-tests: true - ryuk-disabled: false - - test-module-generator: - strategy: - matrix: - go-version: [1.21.x, 1.x] - platform: [ubuntu-latest, macos-latest, windows-latest] - uses: ./.github/workflows/ci-test-go.yml - with: - go-version: ${{ matrix.go-version }} - fail-fast: true - platform: ${{ matrix.platform }} - project-directory: "modulegen" - rootless-docker: false - run-tests: true - ryuk-disabled: false - - test-modules: - needs: test - strategy: - matrix: - go-version: [1.21.x, 1.x] - platform: [ubuntu-latest] - module: [artemis, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, dolt, elasticsearch, gcloud, inbucket, influxdb, k3s, k6, kafka, localstack, mariadb, milvus, minio, mockserver, mongodb, mssql, mysql, nats, neo4j, ollama, openfga, openldap, opensearch, postgres, pulsar, qdrant, rabbitmq, redis, redpanda, registry, surrealdb, vault, weaviate] - uses: ./.github/workflows/ci-test-go.yml - with: - go-version: ${{ matrix.go-version }} - fail-fast: false - platform: ${{ matrix.platform }} - project-directory: modules/${{ matrix.module }} - rootless-docker: false - run-tests: ${{ matrix.platform == 'ubuntu-latest' }} - ryuk-disabled: false - - test-examples: - needs: test-modules - strategy: - matrix: - module: [nginx, toxiproxy] - uses: ./.github/workflows/ci-test-go.yml - with: - go-version: "1.21.x" - fail-fast: true - platform: 'ubuntu-latest' - project-directory: examples/${{ matrix.module }} - rootless-docker: false - run-tests: true - ryuk-disabled: false - - sonarcloud: - permissions: - contents: read # for actions/checkout to fetch code - pull-requests: read # for sonarsource/sonarcloud-github-action to determine which PR to decorate - if: ${{ github.ref_name == 'main' && github.repository_owner == 'testcontainers' }} - needs: test-examples - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - # Disabling shallow clone is recommended for improving relevancy of reporting - fetch-depth: 0 - - - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: sonarcloud - - - name: Analyze with SonarCloud - uses: sonarsource/sonarcloud-github-action@49e6cd3b187936a73b8280d59ffd9da69df63ec9 # v2.1.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/docker-moby-latest.yml b/.github/workflows/docker-moby-latest.yml new file mode 100644 index 0000000000..53989c9a44 --- /dev/null +++ b/.github/workflows/docker-moby-latest.yml @@ -0,0 +1,51 @@ +name: Tests agains Latest Docker Moby + +on: + pull_request: + types: [opened, synchronize, reopened] + schedule: + # nightly build, at 23:59 CEST + - cron: '59 23 * * *' + +jobs: + test_latest_moby: + name: "Core tests using latest moby/moby" + runs-on: 'ubuntu-latest' + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + + - name: Set up Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 + with: + go-version-file: 'go.mod' + cache-dependency-path: 'go.sum' + id: go + + - name: modVerify + run: go mod verify + + - name: modTidy + run: go mod tidy + + - name: Install Latest Docker + run: curl https://get.docker.com | CHANNEL=test sh + + - name: go test + timeout-minutes: 30 + run: make test-unit + + - name: Notify to Slack on failures + id: slack + uses: slackapi/slack-github-action@v1.26.0 + with: + # This data can be any valid JSON from a previous step in the GitHub Action + payload: | + { + "tc_project": "testcontainers-go", + "tc_github_action_url": "https://github.com/testcontainers/testcontainers-go/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}", + "tc_github_action_status": "FAILED", + "tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }}