-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (43 loc) · 1.18 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
41
42
43
44
45
46
47
48
49
50
51
52
name: ci
on:
push:
branches:
- '*'
- '*/*'
- '**'
jobs:
test:
name: Compile & Test
strategy:
matrix:
go-version: [1.19.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install Consul
run: |
mkdir /tmp/consul
cd /tmp/consul
wget https://releases.hashicorp.com/consul/1.8.3/consul_1.8.3_linux_amd64.zip
unzip consul_1.8.3_linux_amd64.zip
chmod +x consul
- name: Extract project version from file
id: version
run: |
echo ::set-output name=VERSION::"$(cat VERSION)"
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
run: |
export PATH="$PATH:/tmp/consul/"
make test
- name: Publish docker image locally for Snyk action
run: make docker-build
- name: Run Snyk to check for vulnerabilities in Docker image
run: snyk container test snowplow/dataflow-runner:${{steps.version.outputs.VERSION}} --severity-threshold=high
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}