Skip to content

Commit

Permalink
workflow: split running tests required to be on the main thread into …
Browse files Browse the repository at this point in the history
…a separate workflow item

with a custom argument (also requires a custom harness supporting main threads)
  • Loading branch information
eugenesvk committed Dec 9, 2024
1 parent 357c3b8 commit 92c2bbd
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@ jobs:
echo "target flag is: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"
- name: cargo test
- name: cargo test (excluding main_thread)
if: ${{ !startsWith(matrix.build, 'netbsd') }}
run: ${{ env.CARGO }} test --verbose ${{ env.TARGET_FLAGS }}
run: ${{ env.CARGO }} test --verbose ${{ env.TARGET_FLAGS }} -- --skip test_main_thread

- name: cargo test (without chrono)
- name: cargo test (only main_thread)
if: ${{ !startsWith(matrix.build, 'netbsd') }}
run: ${{ env.CARGO }} test --verbose --no-default-features --features coinit_apartmentthreaded ${{ env.TARGET_FLAGS }}
run: ${{ env.CARGO }} test test_main_thread --verbose ${{ env.TARGET_FLAGS }} -- --test-threads=1

- name: cargo test (without chrono, excluding main_thread)
if: ${{ !startsWith(matrix.build, 'netbsd') }}
run: ${{ env.CARGO }} test --verbose --no-default-features --features coinit_apartmentthreaded ${{ env.TARGET_FLAGS }} -- --skip test_main_thread

- name: cargo test (without chrono, only main_thread)
if: ${{ !startsWith(matrix.build, 'netbsd') }}
run: ${{ env.CARGO }} test test_main_thread --verbose --no-default-features --features coinit_apartmentthreaded ${{ env.TARGET_FLAGS }} -- --test-threads=1

- name: cargo build
if: ${{ startsWith(matrix.build, 'netbsd') }}
Expand Down

0 comments on commit 92c2bbd

Please sign in to comment.