-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1020 Bytes
/
Copy pathci-shared-api.yml
File metadata and controls
40 lines (38 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI - shared/api
on:
push:
branches: [main]
paths:
- 'shared/api/**'
- 'go.work'
- '.github/workflows/ci-shared-api.yml'
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
paths:
- 'shared/api/**'
- 'go.work'
- '.github/workflows/ci-shared-api.yml'
jobs:
ci:
name: Lint, Test, Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: '1.26.5'
cache: false
- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- name: Lint
working-directory: shared/api
run: golangci-lint run ./...
- name: Test
working-directory: shared/api
run: |
go test -v -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
- name: Build
working-directory: shared/api
run: go build ./...