2022-08-29 18:30:36 -08:00
|
|
|
name: Go Build/Test
|
|
|
|
|
|
|
|
on:
|
2022-09-09 10:49:51 -08:00
|
|
|
workflow_call:
|
2022-08-29 18:30:36 -08:00
|
|
|
|
|
|
|
jobs:
|
2022-09-03 01:30:45 -08:00
|
|
|
Go:
|
2022-08-29 18:30:36 -08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-15 08:08:46 -09:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-29 18:30:36 -08:00
|
|
|
|
|
|
|
- name: Set up Go
|
2023-12-12 05:44:23 -09:00
|
|
|
uses: actions/setup-go@v5
|
2022-08-29 18:30:36 -08:00
|
|
|
with:
|
2024-01-18 13:45:42 -06:00
|
|
|
go-version: "1.21"
|
2022-08-29 18:30:36 -08:00
|
|
|
|
|
|
|
- name: Install Task
|
|
|
|
uses: arduino/setup-task@v1
|
2022-10-31 18:43:30 -08:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-29 18:30:36 -08:00
|
|
|
|
2022-09-03 01:24:28 -08:00
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v3
|
|
|
|
with:
|
|
|
|
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
|
|
|
version: latest
|
|
|
|
|
|
|
|
# Optional: working directory, useful for monorepos
|
|
|
|
working-directory: backend
|
2022-09-05 00:26:21 -08:00
|
|
|
args: --timeout=6m
|
2022-09-03 01:24:28 -08:00
|
|
|
|
2022-08-29 18:30:36 -08:00
|
|
|
- name: Build API
|
2022-10-29 18:15:35 -08:00
|
|
|
run: task go:build
|
2022-08-29 18:30:36 -08:00
|
|
|
|
|
|
|
- name: Test
|
2022-10-29 18:15:35 -08:00
|
|
|
run: task go:coverage
|