Skip to content

feat: enable socket keepalive by default (#211) #540

feat: enable socket keepalive by default (#211)

feat: enable socket keepalive by default (#211) #540

Workflow file for this run

name: CI
on:
push:
branches:
- staging
- trying
pull_request:
branches: [master]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test-windows:
name: Run tests on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: Swatinem/rust-cache@v2
with:
key: windows-latest-test
- name: Test
run: cargo test --features task,subscriber,fixture,task_unstable,io,sync,future,net,tls,rust_tls,timer,fs,zero_copy,mmap,retry
test:
name: Check ${{ matrix.check }} on (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
check: [test]
include:
- os: ubuntu-latest
rust: stable
check: fmt
- os: ubuntu-latest
rust: stable
check: clippy
- os: ubuntu-latest
rust: stable
check: audit
steps:
- uses: actions/checkout@v3
- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.check }}
- name: Clippy
if: ${{ matrix.check == 'clippy' }}
run: make check-clippy
- name: Fmt
if: ${{ matrix.check == 'fmt' }}
run: make check-fmt
- name: Test
if: ${{ matrix.check == 'test' }}
timeout-minutes: 15
run: make test-all
- name: cargo audit
if: ${{ matrix.check == 'audit' }}
timeout-minutes: 15
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
wasm_test:
name: ${{ matrix.test.name }} on (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
# fail-fast: false
matrix:
include:
- os: ubuntu-latest
rust: stable
test: linux-wasm
# - os: macos-latest
# rust: stable
# test: mac-wasm
steps:
- uses: actions/checkout@v3
- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
target: wasm32-unknown-unknown
- name: Run Wasm Test on Linux
if: matrix.test == 'linux-wasm'
run: |
cargo install websocat
websocat -t ws-l:127.0.0.1:1234 mirror: & disown
make test-wasm
- name: Run Wasm Test on Mac
if: matrix.test == 'mac-wasm'
run: |
brew install websocat
websocat -t ws-l:127.0.0.1:1234 mirror: & disown
make test-wasm-safari
done:
name: Done
needs:
- test-windows
- test
- wasm_test
runs-on: ubuntu-latest
steps:
- name: Done
run: echo "Done!"