-
Notifications
You must be signed in to change notification settings - Fork 7
74 lines (65 loc) · 1.57 KB
/
checks.yaml
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
73
74
name: Checks
on:
push:
branches:
- master
- release/*
pull_request:
jobs:
fossa-scan:
name: FOSSA scan
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fossas/fossa-action@v1
with:
api-key: ${{secrets.FOSSA_API_KEY}}
checks:
name: Basic checks
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: black-desk/checks@master
build-and-test:
name: Build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: true
cache-dependency-path: ${{github.workspace}}/go.sum
- name: Upgrade
run: |
sudo apt update &&
sudo apt install systemd util-linux
- name: Build & test (debug mode)
run: |
make GO_TAGS=debug
make GO_TAGS=debug test
- name: Build & test
run: |
make
make GO_COVERAGE_PROFILE=coverage.txt test
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
pass:
name: Pass
if: always()
needs:
- checks
- build-and-test
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}