forked from ArmyCyberInstitute/cmgr
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (41 loc) · 1.12 KB
/
go.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
53
54
name: Go
on:
push:
pull_request:
branches: [ master ]
env:
CMGR_LOGGING: debug
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-20.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16
id: go
- name: Install black
run: sudo apt-get install -y black
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Python format check
run: find . -name *.py -exec black --check {} +
- name: Get dependencies
run: go get -v -t -d ./...
- name: Golang linting
run: go vet ./...
- name: Build
run: mkdir bin && go build -v -ldflags "-X github.com/ArmyCyberInstitute/cmgr/cmgr.version=`git describe --tags`" -o bin ./...
- name: Unit Tests
run: go test -v ./...
- name: Prepare Integration Tests
run: mkdir artifacts
- name: Integration Tests
run: CMGR_DIR=examples CMGR_ARTIFACT_DIR=artifacts bin/cmgr test --require-solve examples