Skip to content

go-build-and-test-amd64 #56

go-build-and-test-amd64

go-build-and-test-amd64 #56

Workflow file for this run

name: go-build-and-test-amd64
on:
push:
pull_request:
schedule:
- cron: "0 8 * * 0" # every sunday
jobs:
build:
name: build
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-22.04]
goos: [linux]
goarch: [amd64]
runs-on: ${{ matrix.os }}
steps:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: check out code into the Go module directory
uses: actions/checkout@v4
- name: build test for ${{ matrix.goarch }}
env:
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
run: make build
image-build:
name: image build
runs-on: ubuntu-22.04
steps:
- name: check out the repo
uses: actions/checkout@v4
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: build and push accelerated-bridge-cni
uses: docker/build-push-action@v5
with:
context: .
push: false
platforms: linux/amd64
tags: |
accelerated-bridge-cni:test
file: ./Dockerfile
test:
name: test
runs-on: ubuntu-22.04
needs: build
steps:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
- name: check out code into the Go module directory
uses: actions/checkout@v4
- name: run unit-test
run: make test
coverage:
runs-on: ubuntu-22.04
needs: build
name: coverage
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Go test with coverage
run: make test-coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: accelerated-bridge.cover