Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add govulncheck-action #600

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: E2E

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set version env variables
run: |
cat .version >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "${{env.GO_VERSION}}"

- name: Generate certificates
run: make -C e2e/certs certs

- name: Build Docker image
run: make update-devel-image

- name: Run e2e test
run: make -C e2e run-e2e

- name: Docker Compose file
if: failure()
run: cat e2e/docker-compose.yaml

- name: Docker Logs
if: failure()
run: make -C e2e dump-logs
36 changes: 2 additions & 34 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
version: "${{env.GOLANGCI_LINT_VERSION}}"

test-ubuntu:
ubuntu-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Run unit test
run: make test coverage

test-windows:
windows-test:
runs-on: windows-latest
steps:
- name: Checkout code
Expand All @@ -57,35 +57,3 @@ jobs:

- name: Run martian unit test
run: make -C internal/martian test

e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set version env variables
run: |
cat .version >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "${{env.GO_VERSION}}"

- name: Generate certificates
run: make -C e2e/certs certs

- name: Build Docker image
run: make update-devel-image

- name: Run e2e test
run: make -C e2e run-e2e

- name: Docker Compose file
if: failure()
run: cat e2e/docker-compose.yaml

- name: Docker Logs
if: failure()
run: make -C e2e dump-logs
29 changes: 29 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Vulnerability check

on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- 'go.mod'
- 'go.sum'

jobs:
govulncheck:
runs-on: ubuntu-latest
name: Run govulncheck
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set version env variables
run: |
cat .version >> $GITHUB_ENV

- id: Run govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: "${{env.GO_VERSION}}"
go-package: ./...