Skip to content

✨ Cache

✨ Cache #23

name: Lint, Test, and Build in Parallel
on: [push]
jobs:
setup-cache:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-keys.outputs.cache-key }}
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Generate cache key
id: cache-keys
run: |
CACHE_DIR=$(yarn cache dir)
echo "Cache directory: $CACHE_DIR"
mkdir -p $CACHE_DIR
echo "::set-output name=cache-key::$CACHE_DIR"
lint:
needs: setup-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: ${{ needs.setup-cache.outputs.cache-key }}
- name: Lint
run: yarn lint
test:
needs: setup-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: ${{ needs.setup-cache.outputs.cache-key }}
- name: Run Tests
run: yarn test:all
build:
needs: setup-cache
runs

Check failure on line 60 in .github/workflows/lint-test-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/lint-test-build.yml

Invalid workflow file

You have an error in your yaml syntax on line 60