Check that go.mod exists in reading the version (#173)

Add additional tests in github actions
Support working directory for reading the version from go.mod
This commit is contained in:
Sergey Vilgelm
2021-02-23 23:51:00 -06:00
committed by GitHub
parent 51485a4001
commit d9f0e73c04
8 changed files with 744 additions and 15 deletions

View File

@ -14,6 +14,7 @@ jobs:
- run: |
npm install
npm run all
test: # make sure the action works on a clean machine without building
strategy:
matrix:
@ -21,17 +22,21 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v1.37"
- "v1.37.1"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ./
with:
version: latest
version: ${{ matrix.version }}
args: --issues-exit-code=0 ./sample/...
only-new-issues: true
# Test with full version vX.Y.Z
test-full-version:
test-go-mod-version:
strategy:
matrix:
os:
@ -43,6 +48,5 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
version: v1.28.3
args: --issues-exit-code=0 ./sample/...
only-new-issues: true
working-directory: sample-go-mod
args: --issues-exit-code=0 ./...