Skip to content

Commit 15f418b

Browse files
authored
Merge branch 'main' into feature/gsk-1745-upgrade-pydantic-to-20
2 parents 792c9e5 + 9e05fe0 commit 15f418b

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

.github/workflows/build_backend.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,23 @@ on:
1414
required: true
1515
type: boolean
1616
default: false
17+
use-cache:
18+
description: 'If cache should be used'
19+
required: true
20+
type: boolean
21+
default: true
1722
workflow_call:
1823
inputs:
1924
run-integration-tests:
2025
description: 'If integration test should be run'
2126
required: true
2227
type: boolean
2328
default: false
29+
use-cache:
30+
description: 'If cache should be used'
31+
required: true
32+
type: boolean
33+
default: false
2434
env:
2535
GSK_DISABLE_ANALYTICS: true
2636
defaults:
@@ -77,10 +87,12 @@ jobs:
7787
- name: Setup Gradle # To cache ~/.gradle
7888
uses: gradle/gradle-build-action@v2
7989
with:
90+
cache-disabled: ${{ github.event_name != 'pull_request' && !inputs.use-cache }}
8091
cache-read-only: false
8192

8293
- name: Cache SonarQube packages
8394
uses: actions/cache@v3
95+
if: ${{ github.event_name == 'pull_request' || inputs.use-cache }}
8496
with:
8597
path: ~/.sonar/cache
8698
key: ${{ runner.os }}-sonar
@@ -112,10 +124,12 @@ jobs:
112124
- name: Setup Gradle # To cache ~/.gradle
113125
uses: gradle/gradle-build-action@v2
114126
with:
127+
cache-disabled: ${{ github.event_name != 'pull_request' && !inputs.use-cache }}
115128
cache-read-only: false
116129

117130
- name: Cache Frontend dependencies
118131
uses: actions/cache@v3
132+
if: ${{ github.event_name == 'pull_request' || inputs.use-cache }}
119133
with:
120134
path: frontend/node_modules
121135
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/package-lock.json')}}
@@ -175,6 +189,7 @@ jobs:
175189

176190
- name: Cache Python deps
177191
uses: actions/cache@v3
192+
if: ${{ github.event_name == 'pull_request' || inputs.use-cache }}
178193
with:
179194
path: python-client/.venv
180195
key: ${{ matrix.os }}-${{ matrix.python-version }}-python-deps-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
@@ -193,6 +208,7 @@ jobs:
193208

194209
- name: Cache Giskard test resources
195210
uses: actions/cache@v3
211+
if: ${{ github.event_name == 'pull_request' || inputs.use-cache }}
196212
with:
197213
path: ~/.giskard
198214
key: ${{ matrix.os }}-${{ matrix.python-version }}-python-test-resources-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
@@ -245,4 +261,4 @@ jobs:
245261
working-directory: python-client
246262
env:
247263
PYTEST_XDIST_AUTO_NUM_WORKERS: 2
248-
run: pdm run test -m 'not slow'
264+
run: pdm run test -m 'slow'

.github/workflows/clear-cache.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Clear all caches
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * 0' # Every week
6+
7+
permissions:
8+
actions: write
9+
10+
jobs:
11+
clear:
12+
name: Clear all cache
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Clear cache
16+
run: gh cache delete --all
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/nightly-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ jobs:
88
call-full-ci:
99
uses: ./.github/workflows/build_backend.yml
1010
with:
11-
run-integration-tests: true
11+
run-integration-tests: true
12+
use-cache: false

0 commit comments

Comments
 (0)