build(deps): Bump org.testcontainers:testcontainers #401
Workflow file for this run
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: "Continuous Integration" | |
on: [push] | |
jobs: | |
build: | |
name: "Build and Tests" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Set up JDK" | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-version: wrapper | |
# disable reading from cache on re-runs to fix possible caching issues | |
cache-write-only: ${{ fromJSON(github.run_attempt) != 1 }} | |
- name: "Build" | |
run: ./gradlew assemble publishToMavenLocal -Psigning.skip=true --scan --console=plain --build-cache | |
- name: "Test" | |
run: ./gradlew check --scan --console=plain --build-cache | |
- name: "Extract current version" | |
run: | | |
TCP_VERSION=$(./gradlew -q version) | |
echo "TCP_VERSION=$TCP_VERSION" >> "$GITHUB_ENV" | |
- name: Select assembly tests repo branch | |
run: | | |
echo "Check if the branch ${GITHUB_REF##*/} exists in assembly tests repo..." | |
EXISTS=$(git ls-remote --heads https://github.com/orange-buffalo/testcontainers-playwright-assembly-tests.git ${GITHUB_REF##*/}) | |
if [[ $EXISTS ]]; then | |
echo "Will be using branch ${GITHUB_REF##*/} from assembly tests repo" | |
echo "ASSEMBLY_TESTS_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
else | |
echo "Branch ${GITHUB_REF##*/} does not exist in assembly tests repo, using master" | |
echo "ASSEMBLY_TESTS_BRANCH=master" >> $GITHUB_ENV | |
fi | |
- name: Checkout assembly tests repo | |
uses: actions/checkout@v4 | |
with: | |
repository: orange-buffalo/testcontainers-playwright-assembly-tests | |
ref: ${{ env.ASSEMBLY_TESTS_BRANCH }} | |
fetch-depth: 0 | |
path: ./.assembly-tests | |
- name: "Test assembly" | |
run: | | |
cd ./.assembly-tests | |
./gradlew test -PtestcontainersPlaywrightVersion=${{ env.TCP_VERSION }} --build-cache --scan | |
- name: "Publish snapshot" | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: ./gradlew publish --scan --console=plain --build-cache | |
env: | |
ORG_GRADLE_PROJECT_ossrhSigningKey: "${{ secrets.ossrhSigningKey }}" | |
ORG_GRADLE_PROJECT_ossrhSigningPassword: "${{ secrets.ossrhSigningPassword }}" | |
ORG_GRADLE_PROJECT_ossrhPassword: "${{ secrets.ossrhPassword }}" | |
ORG_GRADLE_PROJECT_ossrhUser: "${{ secrets.ossrhUser }}" | |
- name: "Save Tests Results" | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: Tests Results | |
path: "**/build/reports/tests/**/" | |
if-no-files-found: "ignore" |