Skip to content

Merge pull request #399 from meshery/dependabot/go_modules/golang.org… #979

Merge pull request #399 from meshery/dependabot/go_modules/golang.org…

Merge pull request #399 from meshery/dependabot/go_modules/golang.org… #979

Workflow file for this run

name: Meshery Consul Default Workflow
on:
push:
branches: [ master ] # keep it simple and reduce the abuse of CI resources
pull_request:
branches: [ master ]
jobs:
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
args: --timeout 5m
codecov:
# golandci-lint need to be run before codecov and succeed
needs: golangci-lint
name: Code Coverage
if: github.repository == 'meshery/meshery-consul'
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19.x
- name: Set up test-env
run: make test-env
- name: Run unit tests
run: go test --short ./... -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage to Codecov
if: github.repository == 'meshery/meshery-consul'
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
flags: unittests
build:
name: Build check
runs-on: ubuntu-latest
# needs: [lint, error_check, static_check, vet, sec_check, tests]
steps:
- name: Check out code
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .