Skip to content

Commit

Permalink
test: add tun integration test (WIP) - 5
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiapple852 committed Jan 4, 2024
1 parent 2a26d5e commit bb2e538
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
build:
- linux-stable
- macos-stable
- windows-stable
include:
- build: linux-stable
os: ubuntu-20.04
Expand All @@ -67,35 +68,33 @@ jobs:
os: macos-latest
target: x86_64-apple-darwin
rust: stable
- build: windows-stable
os: windows-latest
target: x86_64-pc-windows-msvc
rust: stable
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- run: sudo -E env "PATH=$PATH" cargo test --target ${{ matrix.target }} --features sim-tests --test sim -- --exact --nocapture

sim-test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-pc-windows-msvc
- name: Copy wintun.dll to current dir
if: startsWith(matrix.build, 'windows')
shell: bash
run: |
cp "tests/resources/wintun.dll" "."
- name: Allow ICMPv4 and ICMPv6 in Windows defender firewall
if: startsWith(matrix.build, 'windows')
shell: pwsh
run: |
New-NetFirewallRule -DisplayName "ICMPv4 Trippy Allow" -Name ICMPv4_TRIPPY_ALLOW -Protocol ICMPv4 -Action Allow
New-NetFirewallRule -DisplayName "ICMPv6 Trippy Allow" -Name ICMPv6_TRIPPY_ALLOW -Protocol ICMPv6 -Action Allow
- run: cargo test --target x86_64-pc-windows-msvc --features sim-tests --test sim -- --exact --nocapture

- run: sudo -E env "PATH=$PATH" cargo test --target ${{ matrix.target }} --features sim-tests --test sim -- --exact --nocapture
if: !startsWith(matrix.build, 'windows')
- run: cargo test --target --target ${{ matrix.target }} --features sim-tests --test sim -- --exact --nocapture
if: startsWith(matrix.build, 'windows')

fmt:
runs-on: ubuntu-22.04
steps:
Expand Down

0 comments on commit bb2e538

Please sign in to comment.