diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3c2edf9d3f..48430b2b38c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -269,12 +269,14 @@ jobs: name: chezmoi-windows-amd64 path: dist/chezmoi-nocgo_windows_amd64_v1/chezmoi.exe test-ubuntu: + name: test-ubuntu-umask${{ matrix.umask }}-${{ matrix.test-index }} strategy: fail-fast: false matrix: umask: - "022" - "002" + test-index: [0, 1] needs: changes runs-on: ubuntu-20.04 # use older Ubuntu for older glibc permissions: @@ -314,12 +316,27 @@ jobs: - name: run run: | go run . --version + - name: install-gotestsum + run: go install gotest.tools/gotestsum@latest + - name: split-integration-tests + id: test-split + uses: hashicorp-forge/go-test-split-action@v1 + with: + index: ${{ matrix.test-index }} + total: 2 + junit-summary: ./tests-summary.xml - name: test-umask-${{ matrix.umask }} if: github.event_name == 'push' || needs.changes.outputs.code == 'true' env: CHEZMOI_GITHUB_TOKEN: ${{ secrets.CHEZMOI_GITHUB_TOKEN }} run: | - go test -ldflags="-X github.com/twpayne/chezmoi/v2/internal/chezmoitest.umaskStr=0o${{ matrix.umask }}" -race -timeout=1h ./... + gotestsum --junitfile node-summary.xml --format short-verbose -- -run "${{ steps.test-split.outputs.run }}" -ldflags="-X github.com/twpayne/chezmoi/v2/internal/chezmoitest.umaskStr=0o${{ matrix.umask }}" -race -timeout=1h -count=1 + - name: upload-test-artifacts + uses: actions/upload-artifact@v4 + with: + name: test-summary-uname${{ matrix.umask }}-${{ matrix.test-index }} + path: node-summary.xml + retention-days: 1 test-website: runs-on: ubuntu-22.04 permissions: