Ci/caching #306

Merged
mcataford merged 3 commits from ci/caching into master 2023-03-22 04:41:07 +00:00
Showing only changes of commit a658d2a25c - Show all commits

View file

@ -19,14 +19,15 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
if: dependencies-cache
id: dependencies-cache
env:
cache-name: dependencies-cache
with:
path: .yarn
key: ${{ runner.os }}-build-${{env.cache-name}}-${{ hashFile('**/yarn.lock') }}-node-${{ matrix.node-version }}
key: ${{ runner.os }}-build-${{env.cache-name}}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
run: yarn
lint:
runs-on: ubuntu-latest
needs: dependencies
@ -37,13 +38,15 @@ jobs:
with:
node-version: 18
- uses: actions/cache@v3
if: dependencies-cache
id: dependencies-cache
env:
cache-name: dependencies-cache
with:
path: .yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFile('**/yarn.lock') }}-node-18
- run: yarn lint
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-18
- run: |
yarn
yarn lint
test:
runs-on: ubuntu-latest
needs: dependencies
@ -59,13 +62,15 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
if: dependencies-cache
id: dependencies-cache
env:
cache-name: dependencies-cache
with:
path: .yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFile('**/yarn.lock') }}-node-${{ matrix.node-version }}
- run: yarn test:coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
- run: |
yarn
yarn test:coverage
- name: Coverage
uses: codecov/codecov-action@v1
with:
@ -86,10 +91,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
if: dependencies-cache
id: dependencies-cache
env:
cache-name: dependencies-cache
with:
path: .yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFile('**/yarn.lock') }}-node-${{ matrix.node-version }}
- run: yarn build
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
- run: |
yarn
yarn build