Skip to content

Commit

Permalink
rust.yml test on Windows, Mac OS
Browse files Browse the repository at this point in the history
Issue #202
  • Loading branch information
jtmoon79 committed Oct 25, 2023
1 parent 9d32e04 commit c0e3749
Showing 1 changed file with 57 additions and 8 deletions.
65 changes: 57 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c0e3749

Please sign in to comment.