mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-07 16:27:27 +00:00
More testing
This commit is contained in:
parent
aa31d0ee14
commit
2a45d3ea84
3 changed files with 10 additions and 1 deletions
1
.github/workflows/selftest.yml
vendored
1
.github/workflows/selftest.yml
vendored
|
|
@ -11,4 +11,5 @@ jobs:
|
|||
with:
|
||||
go-version: 1.16
|
||||
- name: Run gotestfmt
|
||||
working-directory: testdata
|
||||
run: go test -v ./... | gotestfmt
|
||||
|
|
|
|||
7
index.js
7
index.js
|
|
@ -6,6 +6,9 @@ async function downloadGofmt(octokit, version, versionPrefix, org, repo) {
|
|||
if (!version.startsWith(versionPrefix)) {
|
||||
throw "Specified version " + version + " does not start with required version prefix " + versionPrefix + "."
|
||||
}
|
||||
console.log("Downloading gotestfmt version " + version + " from " + org + "/" + repo + "...")
|
||||
} else {
|
||||
console.log("Downloading latest stable gotestfmt version starting with " + versionPrefix + " from " + org + "/" + repo + "...")
|
||||
}
|
||||
const releases = await octokit.rest.repos.listReleases({
|
||||
owner: org,
|
||||
|
|
@ -13,12 +16,14 @@ async function downloadGofmt(octokit, version, versionPrefix, org, repo) {
|
|||
// No pagination added, we are optimistic that there is a stable release within the first 100
|
||||
// releases.
|
||||
})
|
||||
console.log(releases)
|
||||
for (let release of releases) {
|
||||
console.log(release)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
||||
const versionPrefix = "v1."
|
||||
const token = core.getInput('token');
|
||||
const version = core.getInput('version');
|
||||
|
|
|
|||
3
testdata/go.mod
vendored
Normal file
3
testdata/go.mod
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module "github.com/haveyoudebuggedit/example"
|
||||
|
||||
go 1.16
|
||||
Loading…
Reference in a new issue