Skip to content

Clarification of job dependencies. i.e. test -> needs: build #26144

Answered by ghstahl
ghstahl asked this question in Actions
Discussion options

You must be logged in to vote

https://github.com/fluffy-bunny/typescript-action-needs/blob/master/.github/workflows/test.yml

name: "build-test"
on: # rebuild any PRs and main branch changes
  pull_request:
  push:
    branches:
      - master
      - 'releases/*'

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
npm install
npm run all

- name: upload-artifact
  uses: actions/upload-artifact@v1
  with:
    name: my-artifact
    path: dist

test: # make sure the action works on a clean machine without building
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: download-artifact from build
  uses: actions/download-artifact@v1
  w…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants