Merge pull request #616 from Alero-Awani/fixdeployment #1647
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: Lint and unit tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
golangci: | |
name: lint | |
needs: [tidy] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@master | |
with: | |
go-version: '1.21' | |
cache: true | |
cache-dependency-path: go.sum | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4.0.0 | |
with: | |
version: latest | |
- name: Run golangci-lint | |
run: make check | |
tidy: | |
name: tidy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@master | |
with: | |
go-version: '1.21' | |
cache: true | |
cache-dependency-path: go.sum | |
- name: go mod tidy | |
run: make tidy | |
codecov: | |
name: codecov | |
needs: [ tidy ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
cache: true | |
cache-dependency-path: go.sum | |
- name: test | |
run: make test | |
- name: Upload covergae to Codecov | |
if: github.repository == 'meshery/meshkit' | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.out | |
flags: unittests |