2022-08-30 02:30:36 +00:00
|
|
|
name: Go Build/Test
|
|
|
|
|
|
|
|
on:
|
2022-09-09 18:49:51 +00:00
|
|
|
workflow_call:
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-09-03 09:30:45 +00:00
|
|
|
Go:
|
2022-08-30 02:30:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-15 22:55:32 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
- name: Set up Go
|
2023-01-15 22:55:40 +00:00
|
|
|
uses: actions/setup-go@v3
|
2022-08-30 02:30:36 +00:00
|
|
|
with:
|
2022-09-05 08:26:21 +00:00
|
|
|
go-version: 1.19
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
- name: Install Task
|
|
|
|
uses: arduino/setup-task@v1
|
2022-11-01 02:43:30 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-30 02:30:36 +00:00
|
|
|
|
2022-09-03 09:24:28 +00: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 08:26:21 +00:00
|
|
|
args: --timeout=6m
|
2022-09-03 09:24:28 +00:00
|
|
|
|
2022-08-30 02:30:36 +00:00
|
|
|
- name: Build API
|
2022-10-30 02:15:35 +00:00
|
|
|
run: task go:build
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
- name: Test
|
2022-10-30 02:15:35 +00:00
|
|
|
run: task go:coverage
|