ci pipeline add a lint job #11
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: | |
lint: | |
name: Lint Application | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.23 | |
- uses: arduino/setup-task@v2 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60 | |
test: | |
name: Test Application | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- uses: arduino/setup-task@v2 | |
- name: Run Test | |
run: task test | |
build: | |
name: Build App | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- uses: arduino/setup-task@v2 | |
- 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 |