ci pipeline add a test job #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Checks | |
on: push | |
jobs: | |
test: | |
name: Test Application | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.23 | |
cache: false # https://github.com/actions/setup-go/issues/403 | |
- name: Run Test | |
run: task test | |
build: | |
name: Build App | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.23 | |
cache: false # https://github.com/actions/setup-go/issues/403 | |
- name: Build | |
run: task build | |
- name: Copy Files | |
run: | | |
mkdir artifacts | |
cp bin/linux_amd64/api artifacts/. | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: api | |
path: artifacts |