-
Notifications
You must be signed in to change notification settings - Fork 61
54 lines (47 loc) · 1.16 KB
/
main.yml
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
name: Main Workflow
on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- '*'
tags-ignore:
- 'v*'
paths-ignore:
- 'docs/*'
permissions:
contents: read
jobs:
go-versions:
name: Lookup go versions
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: arnested/go-version-action@v1
id: versions
build:
name: Build Shoutrrr
runs-on: ubuntu-latest
needs: go-versions
strategy:
matrix:
version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
steps:
- name: Set up Go ${{ matrix.version }}
uses: actions/setup-go@v5
id: go
with:
go-version: ${{ matrix.version }}
check-latest: true
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: CGO_ENABLED=0 go build -v .
- name: Test
run: CGO_ENABLED=0 go test -v -coverprofile=coverage.out -covermode=atomic ./...
- name: Publish coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}