Skip to content

Commit 1120b3d

Browse files
Merge pull request #20952 from timvandermeij/github-actions-caching
Implement Node.js caching, and fix Python caching, in the GitHub Actions workflows
2 parents 3e651dd + 8d4151c commit 1120b3d

12 files changed

Lines changed: 17 additions & 7 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fonttools==4.*

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2525
with:
2626
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
2728

2829
- name: Install dependencies
2930
run: npm ci

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2626
with:
2727
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
2829

2930
- name: Install dependencies
3031
run: npm ci

.github/workflows/fluent_linter.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ jobs:
3434
with:
3535
python-version: '3.14'
3636
cache: 'pip'
37+
cache-dependency-path: '.github/fluent_linter_requirements.txt'
3738

38-
- name: Install Fluent dependencies
39-
run: |
40-
pip install -r .github/requirements.txt
39+
- name: Install requirements
40+
run: pip install -r .github/fluent_linter_requirements.txt
4141

4242
- name: Lint Fluent reference files
43-
run: |
44-
moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml
43+
run: moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml

.github/workflows/font_tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
4747
with:
4848
node-version: ${{ matrix.node-version }}
49+
cache: 'npm'
4950

5051
- name: Install dependencies
5152
run: npm ci
@@ -55,9 +56,10 @@ jobs:
5556
with:
5657
python-version: '3.14'
5758
cache: 'pip'
59+
cache-dependency-path: '.github/font_tests_requirements.txt'
5860

59-
- name: Install Fonttools
60-
run: pip install fonttools
61+
- name: Install requirements
62+
run: pip install -r .github/font_tests_requirements.txt
6163

6264
- name: Run font tests
6365
run: npx gulp fonttest --headless

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2525
with:
2626
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
2728

2829
- name: Install dependencies
2930
run: npm ci

.github/workflows/prefs_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2525
with:
2626
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
2728

2829
- name: Install dependencies
2930
run: npm ci

.github/workflows/publish_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2727
with:
2828
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
2930
registry-url: 'https://registry.npmjs.org'
3031

3132
- name: Install dependencies

.github/workflows/publish_website.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2727
with:
2828
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
2930

3031
- name: Install dependencies
3132
run: npm ci

0 commit comments

Comments
 (0)