Skip to content

Commit

Permalink
build: Improve CI labels and add caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Apr 17, 2021
1 parent 6355c44 commit c81d733
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,36 @@ on:
jobs:

tests:
strategy:
matrix:
node:
- 10.x
- 12.x
- 14.x

# Packages 'firefox' and 'chromium' are pre-installed.
#
# https://github.com/actions/virtual-environments/blob/ubuntu20/20210302.0/images/linux/Ubuntu2004-README.md
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
name: Node.js ${{ matrix.node }}
steps:
# Clone the repo and checkout the commit for which the workflow was triggered
- uses: actions/checkout@v2

- name: Install Node.js
- uses: actions/cache@v2
if: ${{ runner.os != 'Windows' }}
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci
- name: Install
run: |
npm ci
- name: Run tests
- name: Tests
run: npm test

0 comments on commit c81d733

Please sign in to comment.