diff --git a/.github/workflows/selftest.yml b/.github/workflows/selftest.yml index e788b43..b5c086c 100644 --- a/.github/workflows/selftest.yml +++ b/.github/workflows/selftest.yml @@ -11,4 +11,5 @@ jobs: with: go-version: 1.16 - name: Run gotestfmt + working-directory: testdata run: go test -v ./... | gotestfmt diff --git a/index.js b/index.js index a204817..0bc9686 100644 --- a/index.js +++ b/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'); diff --git a/testdata/go.mod b/testdata/go.mod new file mode 100644 index 0000000..7e979ac --- /dev/null +++ b/testdata/go.mod @@ -0,0 +1,3 @@ +module "github.com/haveyoudebuggedit/example" + +go 1.16 \ No newline at end of file