forked from IBM/integrity-enforcer
-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (53 loc) · 1.4 KB
/
tests.yaml
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
55
56
57
58
name: Lint and Tests
on: [pull_request]
jobs:
# Lint action
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Run Lint
run: |
set -e
export ISHIELD_REPO_ROOT=$(pwd)
export ISHIELD_ENV="local"
export ISHIELD_TEST_ENV="local"
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1
make lint
# Unit Test action
unit-test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Run Unit Test
run: |
set -e
export ISHIELD_REPO_ROOT=$(pwd)
export ISHIELD_ENV="local"
export ISHIELD_TEST_ENV="local"
make test-unit
# E2e Test action
e2e-test:
name: E2e Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Run E2e Test
run: |
set -e
./build/install-dependencies.sh
export ISHIELD_REPO_ROOT=$(pwd)
export ISHIELD_ENV="local"
export ISHIELD_TEST_ENV="local"
make test-e2e