P
P
picka2021-12-19 13:44:31
GitHub
picka, 2021-12-19 13:44:31

How to install dependencies in github actions and use them in other jobs?

For example, there is the most basic Create React App project. This project has one Workflows file:

name: Check Pull Request

on: [pull_request]

jobs:
  installDeps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: 14

      - run: npm ci

  launchTests:
    needs: deps
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - run: npm test

How can dependencies be used to run launchTests installed in jobs - installDeps?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question