tests: improve bats/gh integration

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-04-15 00:19:17 -07:00
parent e45619d42f
commit d46be324e5
4 changed files with 13 additions and 1 deletions

View File

@ -76,3 +76,11 @@ jobs:
- name: Integration test - name: Integration test
run: | run: |
make integration make integration
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
if: always()
with:
report_paths: "tests/*.xml"
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: "Test Report"

1
.gitignore vendored
View File

@ -12,6 +12,7 @@
# Test binary, build with `go test -c` # Test binary, build with `go test -c`
*.test *.test
tests/report.xml
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out

View File

@ -7,6 +7,9 @@ common_setup() {
DAGGER="${DAGGER_BINARY:-$TESTDIR/../cmd/dagger/dagger}" DAGGER="${DAGGER_BINARY:-$TESTDIR/../cmd/dagger/dagger}"
export DAGGER export DAGGER
DAGGER_LOG_FORMAT="pretty"
export DAGGER_LOG_FORMAT
DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)" DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)"
export DAGGER_STORE export DAGGER_STORE
} }

View File

@ -1,7 +1,7 @@
{ {
"license": "Apache-2.0", "license": "Apache-2.0",
"scripts": { "scripts": {
"test": "bats ." "test": "bats --report-formatter junit ."
}, },
"devDependencies": { "devDependencies": {
"bats": "https://github.com/bats-core/bats-core.git", "bats": "https://github.com/bats-core/bats-core.git",