mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-23 23:36:30 +00:00
508e2e59bd
* refactor and add repo tests * add CI name * use atomic for test shutdown * use go 1.19 * add timeout
40 lines
916 B
YAML
40 lines
916 B
YAML
name: Go Build/Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
Go:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.19
|
|
|
|
- name: Install Task
|
|
uses: arduino/setup-task@v1
|
|
|
|
- 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
|
|
args: --timeout=6m
|
|
|
|
- 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)
|