More testing

This commit is contained in:
Janos 2021-07-28 08:30:44 +02:00
parent aa31d0ee14
commit 2a45d3ea84
No known key found for this signature in database
GPG key ID: 465EF45E51CBA2BA
3 changed files with 10 additions and 1 deletions

View file

@ -11,4 +11,5 @@ jobs:
with:
go-version: 1.16
- name: Run gotestfmt
working-directory: testdata
run: go test -v ./... | gotestfmt

View file

@ -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
View file

@ -0,0 +1,3 @@
module "github.com/haveyoudebuggedit/example"
go 1.16