Skip to content

Run Cosmos Tests

Run Cosmos Tests #474

name: Run Cosmos Tests
on:
schedule:
# run daily at midnight
- cron: 0 0 * * *
workflow_dispatch:
jobs:
Check-Actions-Secrets:
runs-on: ubuntu-latest
outputs:
has-pg-connectionstring: ${{ steps.has-pg-connectionstring.outputs.has-pg-connectionstring }}
steps:
- name: Check if PG_CONNECTION_STRING secret exists
id: has-pg-connectionstring
run: |
[ ! -z "${{ secrets.PG_CONNECTION_STRING }}" ] &&
echo "has-pg-connectionstring=true" >> $GITHUB_OUTPUT
exit 0
Azure-CosmosDB-Integration-Tests:
# run only if PG_CONNECTION_STRING is present
needs: [ Check-Actions-Secrets ]
if: needs.Check-Actions-Secrets.outputs.has-pg-connectionstring == 'true'
runs-on: ubuntu-latest
env:
PG_CONNECTION_STRING: ${{ secrets.PG_CONNECTION_STRING }}
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main
- name: Cosmos PostgreSQL Tests (parallelizable)
run: |
./gradlew test -DincludeTags="ParallelPostgresCosmosTest"
- name: Cosmos PostgreSQL Tests (not parallelizable)
run: |
./gradlew test -DincludeTags="PostgresCosmosTest" --no-parallel