-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 973 Bytes
/
testing-cgo.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
name: Testing CGO
on:
workflow_run:
workflows: [Testing]
types:
- completed
workflow_dispatch:
jobs:
test_cgo_full:
name: Test CGO
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Docker Build CGO
run: |
GOPATH_BIN=$(go env GOPATH)/bin
export PATH="${GOPATH_BIN}:${PATH}"
docker build --build-arg CODECOV_TOKEN_ARG=${{ secrets.CODECOV_TOKEN }} --build-arg GIT_BRANCH_ARG=${{ steps.extract_branch.outputs.branch }} --build-arg MAKE_TARGET_ARG=test_cgo -t pmon3 .
- name: Docker Testing CGO
run: |
GOPATH_BIN=$(go env GOPATH)/bin
export PATH="${GOPATH_BIN}:${PATH}"
docker run -t pmon3
- name: Finish
run: |
echo ":rocket: Testing complete!" >> $GITHUB_STEP_SUMMARY