Skip to content

Commit 52c2a1a

Browse files
committed
chore: Do not run driver and cloud tests on tags
1 parent 18fae4f commit 52c2a1a

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

.github/workflows/cloud.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,32 @@ on:
2424
- 'yarn.lock'
2525

2626
jobs:
27+
latest-tag-sha:
28+
runs-on: ubuntu-20.04
29+
outputs:
30+
sha: ${{ steps.get-tag.outputs.sha }}
31+
steps:
32+
- uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0
35+
- id: git-log
36+
run: git log HEAD~30..HEAD
37+
- id: get-tag-test
38+
run: echo "$SHA $(git rev-list -n 1 $(git tag --contains $SHA))"
39+
env:
40+
SHA: ${{ github.sha }}
41+
- id: get-tag
42+
run: echo "::set-output name=sha::$(git rev-list -n 1 $(git tag --contains $SHA))"
43+
env:
44+
SHA: ${{ github.sha }}
45+
- id: get-tag-out
46+
run: echo "$OUT"
47+
env:
48+
OUT: ${{ steps.get-tag.outputs.sha }}
49+
2750
integration-cloud:
51+
needs: latest-tag-sha
52+
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
2853
runs-on: ubuntu-20.04
2954
timeout-minutes: 60
3055

.github/workflows/drivers-tests.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,32 @@ on:
3535
- 'packages/cubejs-snowflake-driver/**'
3636

3737
jobs:
38+
latest-tag-sha:
39+
runs-on: ubuntu-20.04
40+
outputs:
41+
sha: ${{ steps.get-tag.outputs.sha }}
42+
steps:
43+
- uses: actions/checkout@v3
44+
with:
45+
fetch-depth: 0
46+
- id: git-log
47+
run: git log HEAD~30..HEAD
48+
- id: get-tag-test
49+
run: echo "$SHA $(git rev-list -n 1 $(git tag --contains $SHA))"
50+
env:
51+
SHA: ${{ github.sha }}
52+
- id: get-tag
53+
run: echo "::set-output name=sha::$(git rev-list -n 1 $(git tag --contains $SHA))"
54+
env:
55+
SHA: ${{ github.sha }}
56+
- id: get-tag-out
57+
run: echo "$OUT"
58+
env:
59+
OUT: ${{ steps.get-tag.outputs.sha }}
60+
3861
build:
62+
needs: latest-tag-sha
63+
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
3964
runs-on: ubuntu-20.04
4065
timeout-minutes: 30
4166
steps:
@@ -68,7 +93,8 @@ jobs:
6893
tests:
6994
runs-on: ubuntu-20.04
7095
timeout-minutes: 30
71-
needs: [build]
96+
needs: [latest-tag-sha, build]
97+
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
7298
strategy:
7399
matrix:
74100
node:

0 commit comments

Comments
 (0)