Skip to content

Commit 7955149

Browse files
feat(ci): moved Cosmos tests to scheduled workflow (#30)
1 parent 24ab14f commit 7955149

File tree

2 files changed

+39
-35
lines changed

2 files changed

+39
-35
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run Cosmos Tests
2+
on:
3+
schedule:
4+
# run daily at midnight
5+
- cron: 0 0 * * *
6+
7+
jobs:
8+
Check-Actions-Secrets:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
has-pg-connectionstring: ${{ steps.has-pg-connectionstring.outputs.has-pg-connectionstring }}
12+
steps:
13+
- name: Check if PG_CONNECTION_STRING secret exists
14+
id: has-pg-connectionstring
15+
run: |
16+
[ ! -z "${{ secrets.PG_CONNECTION_STRING }}" ] &&
17+
echo "has-pg-connectionstring=true" >> $GITHUB_OUTPUT
18+
exit 0
19+
20+
Azure-CosmosDB-Integration-Tests:
21+
# run only if PG_CONNECTION_STRING is present
22+
needs: [ Check-Actions-Secrets ]
23+
if: needs.Check-Actions-Secrets.outputs.has-pg-connectionstring == 'true'
24+
runs-on: ubuntu-latest
25+
26+
env:
27+
PG_CONNECTION_STRING: ${{ secrets.PG_CONNECTION_STRING }}
28+
29+
steps:
30+
- uses: actions/checkout@v3
31+
- uses: ./.github/actions/setup-build
32+
33+
- name: Cosmos PostgreSQL Tests (parallelizable)
34+
run: |
35+
./gradlew test -DincludeTags="ParallelPostgresCosmosTest"
36+
37+
- name: Cosmos PostgreSQL Tests (not parallelizable)
38+
run: |
39+
./gradlew test -DincludeTags="PostgresCosmosTest" --no-parallel

.github/workflows/verify.yaml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,6 @@ jobs:
2929
- name: Run Checkstyle
3030
run: ./gradlew checkstyleMain checkstyleTest checkstyleTestFixtures
3131

32-
Check-Actions-Secrets:
33-
runs-on: ubuntu-latest
34-
outputs:
35-
has-pg-connectionstring: ${{ steps.has-pg-connectionstring.outputs.has-pg-connectionstring }}
36-
steps:
37-
- name: Check if PG_CONNECTION_STRING secret exists
38-
id: has-pg-connectionstring
39-
run: |
40-
[ ! -z "${{ secrets.PG_CONNECTION_STRING }}" ] &&
41-
echo "has-pg-connectionstring=true" >> $GITHUB_OUTPUT
42-
exit 0
43-
44-
4532
Unit-Tests:
4633
runs-on: ubuntu-latest
4734
env:
@@ -76,27 +63,6 @@ jobs:
7663
command: |
7764
./gradlew test -DincludeTags="AzureStorageIntegrationTest" --refresh-dependencies
7865
79-
Azure-CosmosDB-Integration-Tests:
80-
# run only if PG_CONNECTION_STRING is present
81-
needs: [ Check-Actions-Secrets ]
82-
if: needs.Check-Actions-Secrets.outputs.has-pg-connectionstring == 'true'
83-
runs-on: ubuntu-latest
84-
85-
env:
86-
PG_CONNECTION_STRING: ${{ secrets.PG_CONNECTION_STRING }}
87-
88-
steps:
89-
- uses: actions/checkout@v3
90-
- uses: ./.github/actions/setup-build
91-
92-
- name: Cosmos PostgreSQL Tests (parallelizable)
93-
run: |
94-
./gradlew test -DincludeTags="ParallelPostgresCosmosTest"
95-
96-
- name: Cosmos PostgreSQL Tests (not parallelizable)
97-
run: |
98-
./gradlew test -DincludeTags="PostgresCosmosTest" --no-parallel
99-
10066
# TODO: this test has been commented out because it was flaky. Further investigation needed. ref: https://github.com/eclipse-edc/Connector/issues/2403
10167
# Azure-Cloud-Integration-Test:
10268
# needs: [ Check-Cloud-Environments ]
@@ -178,7 +144,6 @@ jobs:
178144
needs:
179145
- Unit-Tests
180146
- Azure-Storage-Integration-Tests
181-
- Azure-CosmosDB-Integration-Tests
182147
- End-To-End-Tests
183148
- Component-Tests
184149

0 commit comments

Comments
 (0)