Complete the code to define a step that checks out the repository in a GitHub Actions workflow.
steps:
- name: Checkout code
uses: [1]The actions/checkout@v3 action is used to check out the repository code so the workflow can access it.
Complete the code to set up Deno in the GitHub Actions workflow.
steps:
- name: Setup Deno
uses: [1]The denoland/setup-deno@v1 action installs Deno in the workflow environment.
Fix the error in the command to run tests with Deno in the workflow.
run: deno [1] --unstable --allow-netThe correct command to run tests in Deno is deno test.
Fill both blanks to cache Deno dependencies and restore them in the workflow.
steps:
- name: Cache Deno modules
uses: actions/cache@v3
with:
path: ~/.cache/deno
key: ${{ runner.os }}-deno-[1]
restore-keys: |
${{ runner.os }}-deno-[2]The cache key should be based on the hash of the deno.lock file to update cache when dependencies change.
Fill all three blanks to create a job that runs tests on push events using Deno.
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: [1]
- uses: [2]
- name: Run tests
run: deno [3] --unstable --allow-netThis job checks out the code, sets up Deno, and runs tests on push events.
