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: publish CI test results #7153

Merged
merged 1 commit into from
Nov 3, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- run: make test STATIC_FILES=false GOTEST='go test -covermode=atomic -coverprofile=coverage.out'
- uses: actions/upload-artifact@v2
with:
name: test-results
path: junit.xml
# engineers just ignore this in PRs, so lets not even run it
- run: bash <(curl -s https://codecov.io/bash)
if: github.ref == 'refs/heads/master'
Expand Down Expand Up @@ -132,9 +136,26 @@ jobs:
- run: make wait
timeout-minutes: 4
- run: make ${{matrix.test}} E2E_TIMEOUT=1m STATIC_FILES=false
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.test }}-results
path: junit.xml
- name: cat argo.log
if: ${{ failure() }}
run: cat /tmp/log/argo-e2e/argo.log
# https://github.com/marketplace/actions/publish-unit-test-results
publish-test-results:
name: "Publish Test Results"
needs: [ tests, e2e-tests ]
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- uses: actions/download-artifact@v2
with:
path: artifacts
- uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: artifacts/**/junit.xml
codegen:
name: Codegen
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ hack/**/debug
release-notes
debug.test
git-ask-pass.sh
junit.xml
test.out
*.iml
/coverage.out
.envrc
Expand Down
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,14 @@ lint: server/static/files.go $(GOPATH)/bin/golangci-lint
# Lint Go files
$(GOPATH)/bin/golangci-lint run --fix --verbose

$(GOPATH)/bin/go-junit-report:
go install github.com/jstemmer/[email protected]

# for local we have a faster target that prints to stdout, does not use json, and can cache because it has no coverage
.PHONY: test
test: server/static/files.go dist/argosay
env KUBECONFIG=/dev/null $(GOTEST) ./...
test: server/static/files.go dist/argosay $(GOPATH)/bin/go-junit-report
env KUBECONFIG=/dev/null $(GOTEST) 2>&1 | tee test.out
cat test.out | go-junit-report > junit.xml

.PHONY: install
install: githooks
Expand Down Expand Up @@ -472,8 +476,9 @@ test-e2e: test-api test-cli test-cron test-executor test-functional

test-cli: ./dist/argo

test-%:
$(GOTEST) -timeout 15m -count 1 --tags $* -parallel 10 ./test/e2e
test-%: $(GOPATH)/bin/go-junit-report
go test -v -timeout 15m -count 1 --tags $* -parallel 10 ./test/e2e 2>&1 | tee test.out
cat test.out | go-junit-report > junit.xml

.PHONY: test-examples
test-examples: ./dist/argo
Expand Down