diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 00000000000..3ed9d4f5e39 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,3 @@ +[profile.default] +# Print a slow warning after period, terminate unit-test after 4x period. +slow-timeout = { period = "5s", terminate-after = 4 } diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 59e986e58ca..021f5bfe9b3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -188,6 +188,9 @@ jobs: - name: Change Mirror Priorities if: ${{ runner.environment != 'self-hosted' }} uses: ./.github/actions/apt-mirrors + - uses: taiki-e/install-action@v2 + with: + tool: nextest - name: Bootstrap dependencies if: ${{ runner.environment != 'self-hosted' }} timeout-minutes: 10 @@ -209,17 +212,11 @@ jobs: run: xvfb-run ./mach smoketest --${{ inputs.profile }} - name: Script tests run: ./mach test-scripts - - name: Install cargo nextest - uses: taiki-e/install-action@v2 - with: - tool: nextest - name: Unit tests if: ${{ inputs.unit-tests }} - uses: nick-fields/retry@v3 - with: - timeout_minutes: 20 - max_attempts: 2 # https://github.com/servo/servo/issues/30683 - command: ./mach test-unit --${{ inputs.profile }} + env: + NEXTEST_RETRIES: 2 # https://github.com/servo/servo/issues/30683 + run: ./mach test-unit --${{ inputs.profile }} - name: Devtools tests if: ${{ inputs.unit-tests }} run: ./mach test-devtools --${{ inputs.profile }} diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 1e6d643301d..ec0265d12c2 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -168,6 +168,10 @@ jobs: - name: Install crown run: cargo install --path support/crown + - uses: taiki-e/install-action@v2 + with: + tool: nextest + - if: runner.environment != 'self-hosted' name: Bootstrap run: | @@ -185,17 +189,11 @@ jobs: command: ./mach smoketest --${{ inputs.profile }} - name: Script tests run: ./mach test-scripts - - name: Install cargo nextest - uses: taiki-e/install-action@v2 - with: - tool: nextest - name: Unit tests if: ${{ inputs.unit-tests }} - uses: nick-fields/retry@v3 - with: - timeout_minutes: 40 # https://github.com/servo/servo/issues/30275 - max_attempts: 3 # https://github.com/servo/servo/issues/30683 - command: ./mach test-unit --${{ inputs.profile }} + env: + NEXTEST_RETRIES: 3 # https://github.com/servo/servo/issues/30683 + run: ./mach test-unit --${{ inputs.profile }} - name: Devtools tests if: ${{ inputs.unit-tests }} run: ./mach test-devtools --${{ inputs.profile }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 82efb71c6e5..34a8c265b90 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -180,7 +180,6 @@ jobs: # commit we are building uses a different rustc version. - name: Install crown run: cargo install --path support/crown --force - - name: Debug logging for incremental builds if: ${{ runner.environment == 'self-hosted' }} run: | @@ -209,11 +208,9 @@ jobs: run: cargo install cargo-nextest --locked - name: Unit tests if: ${{ inputs.unit-tests }} - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 3 # https://github.com/servo/servo/issues/30683 - command: .\mach test-unit --${{ inputs.profile }} -- -- --test-threads=1 + env: + NEXTEST_RETRIES: 3 # https://github.com/servo/servo/issues/30683 + run: ./mach test-unit --${{ inputs.profile }} - name: Devtools tests if: ${{ inputs.unit-tests }} run: .\mach test-devtools --${{ inputs.profile }}