Skip to content
Closed
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
7 changes: 5 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ jobs:
MISE_LOG_LEVEL: ${{ runner.debug == '1' && 'trace' || 'info' }}

test:
name: test (${{ matrix.os }}, shard ${{ matrix.shard }})
timeout-minutes: 30
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}
group: >-
test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.shard }}
cancel-in-progress: false
queue: max
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
shard: ["1/3", "2/3", "3/3"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7.0.1
Expand All @@ -57,7 +60,7 @@ jobs:
cache: true
experimental: true
log_level: ${{ runner.debug == '1' && 'trace' || 'info' }}
- run: mise test
- run: mise test --shard ${{ matrix.shard }}
env:
MISE_LOG_LEVEL: ${{ runner.debug == '1' && 'trace' || 'info' }}
LOGTAPE_TEST_MODE: ${{ runner.debug == '1' && 'always' || 'on-failure' }}
Expand Down
4 changes: 3 additions & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ description = "Run tests"
depends = ["build"]
usage = '''
flag "-d --debug" help="Run tests in debug mode"
flag "--shard <shard>" help="Run one test shard as INDEX/TOTAL"
'''
run = '''
#!/usr/bin/env nu
Expand All @@ -260,7 +261,8 @@ if "usage_debug" in $env {
$env.LOGTAPE_TEST_MODE = "on-failure"
$env.LOGTAPE_TEST_LOWEST_LEVEL = "debug"
}
pnpm run --parallel --recursive test --test-concurrency=1
let shard = (if "usage_shard" in $env { [$"--test-shard=($env.usage_shard)"] } else { [] })
node --test ...$shard "packages/*/src/**/*.test.ts"
'''

[tasks."test:postgres"]
Expand Down
Loading