Skip to content

Commit

Permalink
chore: Shard testscript tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI committed Nov 9, 2024
1 parent b70f160 commit ab5c974
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ab5c974

Please sign in to comment.