nerdexam
GitHub

GITHUB-ACTIONS · Question #72

How should you install the bats NPM package in your workflow? A. B. C. D.

The correct answer is D. jobs: example-job: runs-on: ubuntu-latest steps: - run: npm install -g bats. The correct syntax includes specifying the job (example-job), the runner (ubuntu-latest), and the necessary step (npm install -g bats) within the workflow. This ensures that the package is installed properly during the execution of the job.

Author and maintain workflows

Question

How should you install the bats NPM package in your workflow? A. B. C. D.

Exhibits

GITHUB-ACTIONS question #72 exhibit 1
GITHUB-ACTIONS question #72 exhibit 2

Options

  • Ajobs: example-job: steps: - npm install -g bats
  • Bjobs: steps: - run: npm install -g bats
  • Cjobs: runs-on: ubuntu-latest run: npm install -g bats
  • Djobs: example-job: runs-on: ubuntu-latest steps: - run: npm install -g bats

How the community answered

(32 responses)
  • A
    3% (1)
  • B
    6% (2)
  • D
    91% (29)

Explanation

The correct syntax includes specifying the job (example-job), the runner (ubuntu-latest), and the necessary step (npm install -g bats) within the workflow. This ensures that the package is installed properly during the execution of the job.

Topics

#NPM packages#workflow steps#package installation#workflow syntax

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice