Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable cache for npm on GitHub Actions #629

Merged
merged 3 commits into from Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "14"
cache: "npm"

- name: Install dependencies
run: npm ci
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/test.yml
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
- 'renovate/**'
- "renovate/**"
pull_request:

jobs:
Expand All @@ -15,34 +15,34 @@ jobs:
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Test
run: npm test
- name: Test examples
run: |
cd examples/build-and-serve
npm i
npm run build:ci
- name: Test in the oldest Google Closure Tools
run: |
npm i --no-save google-closure-compiler@20180910 google-closure-deps@20190325
OLDEST_COMPILER=1 npm run unit
- name: Test examples in the oldest Google Closure Tools
run: |
cd examples/build-and-serve
npm i --no-save google-closure-library@20180910
npm run build:ci
- name: Report coverage to codecov
if: matrix.node-version == '12.x'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: npx codecov

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only real change is in this line. Other lines were changed by Prettier via my text editor formatter.

- name: Install dependencies
run: npm ci
- name: Test
run: npm test
- name: Test examples
run: |
cd examples/build-and-serve
npm i
npm run build:ci
- name: Test in the oldest Google Closure Tools
run: |
npm i --no-save google-closure-compiler@20180910 google-closure-deps@20190325
OLDEST_COMPILER=1 npm run unit
- name: Test examples in the oldest Google Closure Tools
run: |
cd examples/build-and-serve
npm i --no-save google-closure-library@20180910
npm run build:ci
- name: Report coverage to codecov
if: matrix.node-version == '12.x'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: npx codecov