Skip to content

Improvements GoVPP CLI #346

Improvements GoVPP CLI

Improvements GoVPP CLI #346

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: ibiqlik/action-yamllint@v3
with:
config_file: '.github/ci/yamllint.yml'
go-mod:
name: "Check go.mod"
strategy:
matrix:
go: [ '1.20' ]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup Go"
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- 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:
name: "Check generated binapi"
strategy:
matrix:
go: [ '1.20' ]
env:
VERSION: v0.8.0
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup Go"
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: "Generate binapi"
run: make gen-binapi-docker
- name: "Check binapi"
run: |
git diff --exit-code binapi
build-test:
name: "Build and test"
strategy:
matrix:
go: [ '1.20' ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup Go"
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: "Setup gotestsum"
uses: autero1/[email protected]
with:
gotestsum_version: 1.9.0
- name: "Go Build"
run: go build -v ./...
- name: "Go Test"
run: gotestsum --format testname --jsonfile test.json -- -race ./...
- name: "Test results"
if: always()
uses: guyarb/[email protected]
with:
test-results: test.json
golangci:
name: "GolangCI"
strategy:
matrix:
go: [ '1.20' ]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup Go"
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: "Run golangci"
uses: golangci/golangci-lint-action@v3 # docs: https://github.com/golangci/golangci-lint-action
with:
version: latest