Skip to content

Commit

Permalink
Use default NPM caching in Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebeach committed Jan 29, 2022
1 parent 087b8bc commit f27196b
Showing 1 changed file with 9 additions and 39 deletions.
48 changes: 9 additions & 39 deletions .github/workflows/test.yml
Expand Up @@ -13,30 +13,22 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 15]
node: [12, 14, 16, 17]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
id: cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Load Node version ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Npm Install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run Jest
run: npm run test:ci
- name: Run Coveralls
uses: coverallsapp/github-action@1.1.3
if: matrix.node == '12'
if: matrix.node == '16'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./reports/lcov.info
Expand All @@ -46,18 +38,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
id: cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Load Node
uses: actions/setup-node@v2
with:
cache: npm
- name: Npm Install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Flow type check
run: npm run flow
Expand All @@ -66,24 +51,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12]
node: [16]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
id: cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Load Node version ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Npm Install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run ESLint
run: npm run lint
Expand All @@ -93,18 +70,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
id: cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Load Node version
uses: actions/setup-node@v2
with:
cache: npm
- name: Npm Install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run diff check for the breakUpAriaJSON script
run: node scripts/buildModelModules.js && git diff --exit-code -- src

0 comments on commit f27196b

Please sign in to comment.