Skip to content

Refactor resolving VPP API input #238

Refactor resolving VPP API input

Refactor resolving VPP API input #238

Workflow file for this run

---
name: CI
on:
push:
tags:
- v*
branches:
- master
- ci
pull_request:
# Allows running this workflow manually
workflow_dispatch:
permissions:
contents: read
jobs:
yaml-lint:
name: lint yaml
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Run YAML linter"
uses: karancode/yamllint-github-action@master
with:
yamllint_file_or_dir: '.github/ci/yamllint.yml'
yamllint_strict: true
go-mod:
strategy:
matrix:
go: [ '1.20' ]
name: check go.mod
runs-on: ubuntu-latest
steps:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Run go mod tidy"
run: go mod tidy -v
- name: "Check go.mod"
run: |
git diff --exit-code go.mod
- name: "Check go.sum"
run: |
git diff --exit-code go.sum
binapi:
strategy:
matrix:
go: [ '1.20' ]
env:
VERSION: v0.7.0
name: check binapi
runs-on: ubuntu-latest
steps:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Generate binapi"
run: make gen-binapi-docker
- name: "Check go.mod"
run: |
git diff --exit-code binapi
build-test:
strategy:
matrix:
go: [ '1.20' ]
os: [ ubuntu-latest ]
name: build and test
runs-on: ${{ matrix.os }}
steps:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: "Setup gotestsum"
uses: autero1/action-gotestsum@v1.0.0
with:
gotestsum_version: 1.9.0
- name: "Checkout"
uses: actions/checkout@v3
- name: "Build"
run: go build -v ./...
- name: "Test"
run: gotestsum --format testname --jsonfile test.json -- -race ./...
- name: "Annotate tests"
if: always()
uses: guyarb/golang-test-annotations@v0.6.0
with:
test-results: test.json
golangci:
strategy:
matrix:
go: [ '1.20' ]
name: lint go
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Run golangci"
uses: golangci/golangci-lint-action@v3 # docs: https://github.com/golangci/golangci-lint-action
with:
version: latest