-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.33 KB
/
Copy pathci.yaml
File metadata and controls
58 lines (47 loc) · 1.33 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
# See: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
name: CI
permissions:
contents: read
on:
push:
branches: [ "main" ]
paths-ignore:
- '**.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- '**.md'
jobs:
test:
name: Build + Lint + Fmt + Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install asdf
uses: asdf-vm/actions/setup@v4
- name: Install Task
run: |
asdf plugin add task
asdf install task
- name: Install (rest of the) Tools
run: task tools.install
- name: Vulnerability Scan
run: task vuln
- name: Build
run: task build
- name: Check for Linting or Formatting issues
run: |
task lint-fix
task fmt
git diff --exit-code
- name: Test with Coverage report
env:
SPELUNK_1PASSWORD_TEST_SATOKEN: ${{ secrets.SPELUNK_1PASSWORD_TEST_SATOKEN }}
run: |
task test.ci
go tool cover -func=coverage.out > coverage.txt
echo "## Test Coverage Report" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat coverage.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY