Skip to content

chore(build): document action tag referenced by hash #1247

chore(build): document action tag referenced by hash

chore(build): document action tag referenced by hash #1247

Workflow file for this run

# This workflow tests the feature of using an external MongoDB for tests
name: Java Test MongoDB
on:
push:
branches:
- main
pull_request:
jobs:
# Test with real MongoDB
test-mongodb:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
TEST_MONGODB_CONNECTION_STRING: mongodb://test:example@localhost:27017/testdb?authSource=admin
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Start MongoDB
run: docker run -d -e MONGO_INITDB_ROOT_USERNAME=test -e MONGO_INITDB_ROOT_PASSWORD=example -p 27017:27017 --name test_mongo mongo:5.0.20-focal
- name: Test with Gradle
run: ./gradlew :sda-commons-starter-mongodb:test
- name: Assert use of MongoDB
run: "docker logs test_mongo | grep -F 'createCollection' | grep -F 'testdb.'"
- name: Stop MongoDB
run: docker stop test_mongo