Skip to content

Commit

Permalink
add test job
Browse files Browse the repository at this point in the history
  • Loading branch information
daemon1024 committed Jun 30, 2021
1 parent 72bc4fd commit ffd6c7d
Showing 1 changed file with 30 additions and 46 deletions.
76 changes: 30 additions & 46 deletions .github/workflows/go-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -43,50 +43,34 @@ jobs:
cat /etc/os-release
uname -a
- name: debug
run: cd KubeArmor && make build
- run: cd KubeArmor

- name: build
run: make build
env:
GOPATH: /home/runner/go
# mod:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.16
# - name: Check module vendoring
# run: |
# cd KubeArmor
# go mod tidy
# test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v2
# with:
# working-directory: KubeArmor
# vet:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.16
# - name: Vet
# run: cd KubeArmor && go vet .
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.16
# - name: Test
# run: cd KubeArmor && make testall
# env:
# GOPATH: /home/runner/go

- name: test
run: make testall

mod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Check module vendoring
run: |
cd KubeArmor
go mod tidy
test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
working-directory: KubeArmor

0 comments on commit ffd6c7d

Please sign in to comment.