It would be cool if I could run a workflow that looks like the following - maybe I'm just missing a simple configuration in GitHub actions but I don't know how to share a workspace between jobs, while using job.needs
to specify which jobs can run when others have completed successfully.
name: Node CI
on: [push]
env:
CI: true
jobs:
install:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install node_modules
run: yarn install
lint:
runs-on: ubuntu-latest
needs: [install]
steps:
- name: eslint
run: yarn lint
build:
needs: [install]
runs-on: ubuntu-latest
steps:
- name: yarn build
run: yarn build
test:
needs: [install, build]
runs-on: ubuntu-latest
steps:
- name: jest
run: yarn test --coverage
I have read Github actions share workspace/artifacts between jobs? but I'd rather not have to upload node_modules
and download for every step.