mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-16 20:51:46 +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:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
- name: Run gotestfmt
|
- name: Run gotestfmt
|
||||||
|
working-directory: testdata
|
||||||
run: go test -v ./... | gotestfmt
|
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)) {
|
if (!version.startsWith(versionPrefix)) {
|
||||||
throw "Specified version " + version + " does not start with required version prefix " + 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({
|
const releases = await octokit.rest.repos.listReleases({
|
||||||
owner: org,
|
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
|
// No pagination added, we are optimistic that there is a stable release within the first 100
|
||||||
// releases.
|
// releases.
|
||||||
})
|
})
|
||||||
|
console.log(releases)
|
||||||
for (let release of releases) {
|
for (let release of releases) {
|
||||||
console.log(release)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
||||||
const versionPrefix = "v1."
|
const versionPrefix = "v1."
|
||||||
const token = core.getInput('token');
|
const token = core.getInput('token');
|
||||||
const version = core.getInput('version');
|
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