-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (39 loc) · 1.09 KB
/
ci.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
name: "CI"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: ./
id: coverage
with:
working-directory: test-go-module
coverage-threshold: 0
cover-pkg: ./...
- if: steps.coverage.outputs.coverage-pct < 40
uses: actions/github-script@v7
with:
script: |
core.setFailed('Incorrect coverage-pct: ${{ steps.coverage.outputs.coverage-pct }}')
- if: steps.coverage.outputs.coverage-pct-0dp != '67'
uses: actions/github-script@v7
with:
script: |
core.setFailed('Incorrect coverage-pct-0dp: ${{ steps.coverage.outputs.coverage-pct-0dp }}')
- if: steps.coverage.outputs.coverage-pct-1dp != '66.7'
uses: actions/github-script@v7
with:
script: |
core.setFailed('Incorrect coverage-pct-1dp: ${{ steps.coverage.outputs.coverage-pct-1dp }}')