-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 963 Bytes
/
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check PR title. If it contains SKIP, skip this CI test
run: |
if [[ title="${{ github.event.pull_request.title }}" ]]; then
echo "PR title starts with 'SKIP'"
exit 0
else
echo "PR title did not start with 'SKIP'"
exit 0
fi
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- name: Set up Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492
with:
go-version: 1.17
- name: Build
run: CGO_ENABLED=0 go build -trimpath -a -tags netgo -ldflags '-w -extldflags' -o scorecard-webapp
- name: Test
run: CGO_ENABLED=0 go test -trimpath -a -tags netgo -ldflags '-w -extldflags' -o scorecard-webapp