-
Notifications
You must be signed in to change notification settings - Fork 52
43 lines (37 loc) · 1.27 KB
/
workflow.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
name: test
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: "Unit test"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
check-latest: true
- name: Check out code into the Go module directory
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
path: go/src/github.com/open-policy-agent/frameworks
- name: Unit test
run: |
export PATH=$PATH:${GOBIN}
make -C constraint native-test
working-directory: go/src/github.com/open-policy-agent/frameworks
env:
GOPATH: ${{ github.workspace }}/go
GOBIN: ${{ github.workspace }}/go/bin
- name: Codecov Upload
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
flags: unittests
file: go/src/github.com/open-policy-agent/frameworks/constraint/cover.out
fail_ci_if_error: false