2022-08-30 02:30:36 +00:00
|
|
|
name: Go Build/Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
2022-09-03 09:30:45 +00:00
|
|
|
Go:
|
2022-08-30 02:30:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.18
|
|
|
|
|
|
|
|
- name: Install Task
|
|
|
|
uses: arduino/setup-task@v1
|
|
|
|
|
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-08-30 02:30:36 +00:00
|
|
|
- name: Build API
|
|
|
|
run: task api:build
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: task api:coverage
|
|
|
|
|
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
run: cd backend && bash <(curl -s https://codecov.io/bash)
|