mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-19 06:01:45 +00:00
Issue haveyoudebuggedit/gotestfmt#8: JSON support
This commit is contained in:
parent
4e82a4309c
commit
6de7a4ac64
3 changed files with 6 additions and 6 deletions
6
.github/workflows/selftest.yml
vendored
6
.github/workflows/selftest.yml
vendored
|
|
@ -7,17 +7,17 @@ jobs:
|
||||||
name: Self-test
|
name: Self-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install gotestfmt
|
|
||||||
uses: haveyoudebuggedit/gotestfmt-action@main
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Install gotestfmt
|
||||||
|
uses: ./
|
||||||
- name: Run gotestfmt
|
- name: Run gotestfmt
|
||||||
working-directory: testdata
|
working-directory: testdata
|
||||||
run: go test -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
|
run: go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
|
||||||
- name: Upload test log
|
- name: Upload test log
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,12 @@ jobs:
|
||||||
|
|
||||||
# Install gotestfmt on the VM running the action.
|
# Install gotestfmt on the VM running the action.
|
||||||
- name: Set up gotestfmt
|
- name: Set up gotestfmt
|
||||||
uses: haveyoudebuggedit/gotestfmt-action@v1
|
uses: haveyoudebuggedit/gotestfmt-action@v2
|
||||||
with:
|
with:
|
||||||
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
|
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Optional: pass the gotestfmt version you want to run.
|
# Optional: pass the gotestfmt version you want to run.
|
||||||
version: v1.0.0
|
version: v2.0.0
|
||||||
# Optional: pass an organization name and repo to use a fork
|
# Optional: pass an organization name and repo to use a fork
|
||||||
org: haveyoudebuggedit
|
org: haveyoudebuggedit
|
||||||
repo: gotestfmt
|
repo: gotestfmt
|
||||||
|
|
|
||||||
2
index.js
2
index.js
|
|
@ -72,7 +72,7 @@ async function downloadGofmt(octokit, version, versionPrefix, org, repo, token)
|
||||||
async function main() {
|
async function main() {
|
||||||
try {
|
try {
|
||||||
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
||||||
const versionPrefix = "v1."
|
const versionPrefix = "v2."
|
||||||
const token = core.getInput('token');
|
const token = core.getInput('token');
|
||||||
const version = core.getInput('version');
|
const version = core.getInput('version');
|
||||||
const org = core.getInput("org")
|
const org = core.getInput("org")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue