Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): improve tparse #527

Merged
merged 2 commits into from Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/build.yml
Expand Up @@ -37,13 +37,7 @@ jobs:
run: go install github.com/mfridman/tparse@latest
- run: task setup
- name: test
run: |
task test | tee output.json | tparse -notests -follow -all
tparse -format markdown -file output.json -all > $GITHUB_STEP_SUMMARY
env:
TEST_OPTIONS: "-json"
NO_COLOR: 1
- run: git diff
run: ./scripts/test.sh test ${{ matrix.os }}
- uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
Expand Down Expand Up @@ -81,12 +75,8 @@ jobs:
- name: setup-tparse
run: go install github.com/mfridman/tparse@latest
- name: acceptance
run: |
task acceptance | tee output.json | tparse -notests -follow -all
tparse -format markdown -file output.json -all > $GITHUB_STEP_SUMMARY
run: ./scripts/test.sh acceptance ubuntu-latest
env:
TEST_OPTIONS: "-json"
NO_COLOR: 1
TEST_PATTERN: "/${{ matrix.pkgFormat }}/${{ matrix.pkgPlatform }}/"
goreleaser:
strategy:
Expand Down
1 change: 0 additions & 1 deletion deprecation/deprecation_test.go
Expand Up @@ -8,7 +8,6 @@ import (
)

func TestNotice(t *testing.T) {
Print("before")
var b bytes.Buffer
Noticer = prefixed{&b}
Print("blah\n")
Expand Down
11 changes: 11 additions & 0 deletions scripts/test.sh
@@ -0,0 +1,11 @@
#!/bin/bash

set -o pipefail && TEST_OPTIONS="-json" task $1 | tee output.json | tparse -follow
success=$?

if [ "$2" = "ubuntu-latest" ]; then
set -e
NO_COLOR=1 tparse -format markdown -slow 10 -file output.json > $GITHUB_STEP_SUMMARY
fi

exit $success