This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
feat(BUX-212/BUX-213): adds new version of codeowner/codestandards/template files #30
Workflow file for this run
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
# See more at: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | |
name: run-go-tests | |
env: | |
GO111MODULE: on | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "*" | |
jobs: | |
yamllint: | |
name: Run yaml linter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run yaml linter | |
uses: ibiqlik/action-yamllint@v3.1 | |
asknancy: | |
name: Ask Nancy (check dependencies) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Write go list | |
run: go list -json -m all > go.list | |
- name: Ask Nancy | |
uses: sonatype-nexus-community/nancy-github-action@v1.0.3 | |
# continue-on-error: true | |
test: | |
needs: [yamllint, asknancy] | |
strategy: | |
matrix: | |
go-version: [1.18.x, 1.19.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache code | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/pkg/mod # Module download cache | |
~/.cache/go-build # Build cache (Linux) | |
~/Library/Caches/go-build # Build cache (Mac) | |
'%LocalAppData%\go-build' # Build cache (Windows) | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run linter and tests | |
run: make test-ci | |
- name: Update code coverage | |
uses: codecov/codecov-action@v3.1.4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |