Run StoneWork CI tests on Ubuntu 20.04 #334
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.18' | |
- run: go mod tidy -v | |
- name: "Check for changes in go.mod" | |
run: | | |
git diff --name-only --exit-code go.mod || ( git diff && echo "Run go tidy to update go.mod" && false ) | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.18' | |
- run: go mod download | |
- name: "Compile Go code" | |
run: | | |
go build -v ./... | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Enable VRF kernel module" | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install -y linux-modules-extra-$(uname -r) && \ | |
sudo modprobe -v vrf || echo >&2 "FAILURE" | |
- name: "Build images" | |
run: make images | |
- name: "Run Tests" | |
run: make test |