Complete the code to specify the name of the GitHub Actions workflow.
name: [1]The name field sets the workflow's name shown in GitHub Actions.
Complete the code to specify the event that triggers the workflow on every push.
on: [1]The on field defines the event that triggers the workflow. push triggers it on every push.
Fix the error in the job definition by completing the job ID.
jobs:
[1]:
runs-on: ubuntu-latestThe job ID is a key under jobs. It should be a simple identifier like 'build'.
Fill both blanks to define a step that checks out the repository code.
steps:
- name: Checkout code
uses: [1]
with:
[2]: 'v3'The uses field specifies the action to checkout code. The with field uses ref to specify the version.
Fill all three blanks to define a step that sets up Java 17 and runs Maven tests.
- name: Setup Java
uses: [1]
with:
java-version: '[2]'
- name: Run tests
run: [3]The Java setup uses 'actions/setup-java@v3'. The Java version is '17'. The test command is 'mvn test'.