Excluding the cyclop linter #6
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: Unit Testing | |
on: [push] | |
jobs: | |
# python-tests: | |
# name: Run Python unit tests | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# - name: Set up Python | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.x | |
# - name: Install dependencies | |
# run: pip install -r requirements.txt | |
# - name: Run unit tests | |
# run: pytest | |
go-tests: | |
name: Run Go unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "~1.21" # Use the version of Go in your project | |
- name: generate test coverage | |
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... | |
- name: generate test coverage report | |
run: go tool cover -html=./cover.out -o ./cover.html | |
- name: upload coverage report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report | |
path: ./cover.html | |
- name: check test coverage | |
uses: vladopajic/go-test-coverage@v2 | |
with: | |
# Configure action by specifying input parameters individually (option 2). | |
# If you are using config file you shouldn't use these parameters. | |
profile: cover.out |