-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.54 KB
/
ci.yml
File metadata and controls
72 lines (59 loc) · 1.54 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
permissions:
contents: read
on:
push:
branches: ["main"]
paths-ignore:
- "docs/**"
pull_request:
branches: ["main"]
paths-ignore:
- "docs/**"
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20
with:
version: latest
build-demo:
name: build demo apps
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Test
run: go build ./demo-app/cmd/...
test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macos]
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Test
run: go test -v -race -coverprofile="coverage.tmp.txt" ./...
- name: Filter coverage
if: matrix.os == 'ubuntu'
run: cat coverage.tmp.txt | grep -v "demo-app" | grep -v "platforma/docs" > coverage.txt
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu'
uses: shogo82148/actions-goveralls@9606dbc5ac5cf888a0e9ef901515c3cd516a2790
with:
path-to-profile: coverage.txt