Merge pull request #391 from 88labs/dependabot/go_modules/envlookup/g… #113
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: Test envlookup | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "envlookup/**" | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
paths: | |
- "envlookup/**" | |
env: | |
testdir : ./envlookup | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [ 1.21.x ] | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Go Module Download | |
working-directory: ${{ env.testdir }} | |
run: | | |
go install gotest.tools/gotestsum@latest | |
go mod download | |
- name: Test | |
working-directory: ${{ env.testdir }} | |
timeout-minutes: 3 | |
run: | | |
# shellcheck disable=SC2046 | |
gotestsum --junitfile unit-tests.xml -- -v ./... -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./... | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ env.testdir }}/coverage.txt |