diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index dd02f3ca..e8558a12 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -221,9 +221,9 @@ jobs: cargo --version cargo bench --no-run - job_test: + job_test_linux: # this job downloads and builds dependency crates - name: test + name: test linux needs: [job_rust_release_channel, job_rust_msrv_os] runs-on: ubuntu-latest steps: @@ -255,18 +255,67 @@ jobs: | sort # run tests that use libsystemd cargo test journalreader_tests - - name: install nextest - uses: actions-rs/cargo@v1 - with: - command: install - args: cargo-nextest --locked + - name: install nextest binary + shell: bash + run: | + set -eux + curl -vLsSf "https://get.nexte.st/latest/linux" | tar zxf - -C "${CARGO_HOME:-${HOME}/.cargo}/bin" + cargo nextest --version - name: nextest (all) shell: bash run: | set -eux cargo nextest --version export NEXTEST_TEST_THREADS="num-cpus" - cargo nextest run --bin s4 --lib --fail-fast --final-status-level=all + cargo nextest run --bin s4 --lib --no-fail-fast --final-status-level=fail + + job_test_macos: + name: test Mac OS + # TODO: uncomment `needs` + #needs: [job_rust_release_channel, job_rust_msrv_os] + runs-on: macos-latest + steps: + - name: git checkout + uses: actions/checkout@v3 + - name: install nextest binary + shell: bash + run: | + set -eux + curl -vLsSf "https://get.nexte.st/latest/mac" | tar zxf - -C "${CARGO_HOME:-${HOME}/.cargo}/bin" + cargo nextest --version + - name: nextest (all) + shell: bash + # TODO: add back --fail-fast + run: | + cargo nextest --version + export NEXTEST_TEST_THREADS="num-cpus" + cargo nextest run --bin s4 --lib --no-fail-fast --final-status-level=fail + + job_test_windows: + name: test Windows + # TODO: uncomment `needs` + #needs: [job_rust_release_channel, job_rust_msrv_os] + runs-on: windows-latest + steps: + - name: git checkout + uses: actions/checkout@v3 + - name: install nextest binary + shell: powershell + run: | + Set-PSDebug -Trace 1 + $tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } -PassThru + Invoke-WebRequest -OutFile $tmp "https://get.nexte.st/latest/windows" + $outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "${Env:USERPROFILE}/.cargo/bin" } + $tmp | Expand-Archive -DestinationPath $outputDir -Force + $tmp | Remove-Item + cargo.exe nextest --version + - name: nextest (all) + shell: powershell + # TODO: add back --fail-fast + run: | + cargo.exe nextest --version + ${env:NEXTEST_TEST_THREADS}="num-cpus" + cargo.exe nextest run --bin s4 --lib --no-fail-fast --final-status-level=fail job_doc_publish: # this job downloads and builds dependency crates