Skip to content

Test

Test #17

Workflow file for this run

name: Test
on:
workflow_dispatch: { }
workflow_call:
secrets:
TC_CLOUD_TOKEN:
required: true
jobs:
core-cloud:
env:
TC_CLOUD_TOKEN: ${{ secrets.TC_CLOUD_TOKEN }}
TC_CLOUD_CONCURRENCY: 4
name: Test (Cloud) - core
runs-on: ubuntu-latest
steps:
- name: Prepare Testcontainers Cloud agent
run: |
curl -L -o agent https://app.testcontainers.cloud/download/testcontainers-cloud-agent_linux_x86-64
chmod +x agent
./agent &
./agent wait
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build & Copy exporter
run: >
mvn -B -T1C -DskipTests -DskipChecks install
- name: Test
timeout-minutes: 20
run: >
mvn -B -Pparallel-tests -DforkCount=2C -DskipChecks -pl core verify
- name: Archive Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: cloud-core-test-results
path: "**/target/surefire-reports/**"
retention-days: 3
core-local:
name: Test (Local) - core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build & Copy exporter
run: >
mvn -B -T1C -DskipTests -DskipChecks install
- name: Test
timeout-minutes: 20
# cannot run tests in parallel when using the local daemon
run: >
mvn -B -DskipChecks -Plocal-test -pl core verify
- name: Archive Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: local-core-test-results
path: "**/target/surefire-reports/**"
retention-days: 3
engine:
env:
TC_CLOUD_TOKEN: ${{ secrets.TC_CLOUD_TOKEN }}
TC_CLOUD_CONCURRENCY: 4
name: Test (Cloud) - engine
runs-on: ubuntu-latest
steps:
- name: Prepare Testcontainers Cloud agent
run: |
curl -L -o agent https://app.testcontainers.cloud/download/testcontainers-cloud-agent_linux_x86-64
chmod +x agent
./agent &
./agent wait
- uses: actions/checkout@v4
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build & Copy exporter
run: >
mvn -B -T1C -DskipTests -DskipChecks install
- name: Test
timeout-minutes: 20
run: >
mvn -B -Pparallel-tests -DforkCount=2C -DskipChecks -pl engine verify
- name: Archive Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: cloud-engine-test-results
path: "**/target/surefire-reports/**"
retention-days: 3
exporter:
name: Test (Local) - exporter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build
run: mvn -B -DskipTests -DskipChecks install
- name: Test
timeout-minutes: 20
run: >
mvn -B -DskipChecks -pl exporter-test verify
- name: Archive Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: local-exporter-test-results
path: "**/target/surefire-reports/**"
retention-days: 3