Skip to content

Commit 388b40a

Browse files
committed
Cache node/composer dependencies
1 parent 4a99171 commit 388b40a

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.github/workflows/database-upgrade.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ jobs:
2424
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
2525
steps:
2626
- uses: actions/checkout@v4
27+
- name: Cache node modules
28+
uses: actions/cache@v4
29+
with:
30+
path: webapp/node_modules
31+
key: npm-${{ hashFiles('webapp/package-lock.json') }}
32+
restore-keys: |
33+
npm-
34+
- name: Cache composer dependencies
35+
uses: actions/cache@v4
36+
with:
37+
path: webapp/vendor
38+
key: composer-${{ hashFiles('webapp/composer.lock') }}
39+
restore-keys: |
40+
composer-
2741
- name: Import Database
2842
run: mysql -hsqlserver -uroot -proot < .github/jobs/data/dj733.sql
2943
- name: Upgrade DOMjudge

.github/workflows/integration.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ jobs:
2525
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
2626
steps:
2727
- uses: actions/checkout@v4
28+
- name: Cache node modules
29+
uses: actions/cache@v4
30+
with:
31+
path: webapp/node_modules
32+
key: npm-${{ hashFiles('webapp/package-lock.json') }}
33+
restore-keys: |
34+
npm-
35+
- name: Cache composer dependencies
36+
uses: actions/cache@v4
37+
with:
38+
path: webapp/vendor
39+
key: composer-${{ hashFiles('webapp/composer.lock') }}
40+
restore-keys: |
41+
composer-
2842
- name: info
2943
run: |
3044
cat /proc/cmdline && echo &&

.github/workflows/unit-tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ jobs:
4848
TEST: [Unit, E2E]
4949
steps:
5050
- uses: actions/checkout@v4
51+
- name: Cache node modules
52+
uses: actions/cache@v4
53+
with:
54+
path: webapp/node_modules
55+
key: npm-${{ hashFiles('webapp/package-lock.json') }}
56+
restore-keys: |
57+
npm-
58+
- name: Cache composer dependencies
59+
uses: actions/cache@v4
60+
with:
61+
path: webapp/vendor
62+
key: composer-${{ hashFiles('webapp/composer.lock') }}
63+
restore-keys: |
64+
composer-
5165
- name: info
5266
run: |
5367
cat /proc/cmdline && echo &&

.github/workflows/webstandard.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ jobs:
5050
db: install
5151
steps:
5252
- uses: actions/checkout@v4
53+
- name: Cache node modules
54+
uses: actions/cache@v4
55+
with:
56+
path: webapp/node_modules
57+
key: npm-${{ hashFiles('webapp/package-lock.json') }}
58+
restore-keys: |
59+
npm-
60+
- name: Cache composer dependencies
61+
uses: actions/cache@v4
62+
with:
63+
path: webapp/vendor
64+
key: composer-${{ hashFiles('webapp/composer.lock') }}
65+
restore-keys: |
66+
composer-
5367
- name: Install DOMjudge
5468
run: .github/jobs/baseinstall.sh ${{ matrix.role }}
5569
- name: Run webstandard tests (W3C, WCAG)

0 commit comments

Comments
 (0)