Use cargo nextest
This commit is contained in:
parent
7a2666bde2
commit
6cd3c1081b
|
@ -11,10 +11,8 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Clone spacebar server
|
- name: Clone spacebar server
|
||||||
|
@ -23,7 +21,7 @@ jobs:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
cache-dependency-path: server/package-lock.json
|
cache-dependency-path: server/package-lock.json
|
||||||
- name: Prepare and start Spacebar server
|
- name: Prepare and start Spacebar server
|
||||||
run: |
|
run: |
|
||||||
|
@ -35,16 +33,23 @@ jobs:
|
||||||
with:
|
with:
|
||||||
cache-all-crates: "true"
|
cache-all-crates: "true"
|
||||||
prefix-key: "linux"
|
prefix-key: "linux"
|
||||||
- name: Build, Test and Publish Coverage
|
- uses: taiki-e/install-action@nextest
|
||||||
|
- name: Build, Test with nextest, Publish Coverage
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
|
if [ -n "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
|
||||||
|
if [ "${github.event.pull_request.head.ref}" = "main" ]; then
|
||||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||||
cargo binstall --no-confirm cargo-tarpaulin --force
|
cargo binstall --no-confirm cargo-tarpaulin --force
|
||||||
cargo tarpaulin --all-features --avoid-cfg-tarpaulin --tests --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120
|
cargo tarpaulin --all-features --avoid-cfg-tarpaulin --tests --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120
|
||||||
else
|
else
|
||||||
echo "Code Coverage step is skipped on forks!"
|
echo "Code Coverage step is skipped on non-main PRs and PRs from forks."
|
||||||
cargo build --verbose --all-features
|
cargo build --verbose --all-features
|
||||||
cargo test --verbose --all-features
|
cargo nextest run --verbose --all-features
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Code Coverage step is skipped on non-main PRs and PRs from forks."
|
||||||
|
cargo build --verbose --all-features
|
||||||
|
cargo nextest run --verbose --all-features
|
||||||
fi
|
fi
|
||||||
- name: Check common non-default feature configurations
|
- name: Check common non-default feature configurations
|
||||||
run: |
|
run: |
|
||||||
|
@ -66,34 +71,6 @@ jobs:
|
||||||
cargo check --features="backend, voice_gateway" --no-default-features
|
cargo check --features="backend, voice_gateway" --no-default-features
|
||||||
echo "Client + voice gateway:"
|
echo "Client + voice gateway:"
|
||||||
cargo check --features="client, voice_gateway" --no-default-features
|
cargo check --features="client, voice_gateway" --no-default-features
|
||||||
# wasm-safari:
|
|
||||||
# runs-on: macos-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
# - name: Clone spacebar server
|
|
||||||
# run: |
|
|
||||||
# git clone https://github.com/bitfl0wer/server.git
|
|
||||||
# - uses: actions/setup-node@v4
|
|
||||||
# with:
|
|
||||||
# node-version: 18
|
|
||||||
# cache: 'npm'
|
|
||||||
# cache-dependency-path: server/package-lock.json
|
|
||||||
# - name: Prepare and start Spacebar server
|
|
||||||
# run: |
|
|
||||||
# npm install
|
|
||||||
# npm run setup
|
|
||||||
# npm run start &
|
|
||||||
# working-directory: ./server
|
|
||||||
# - uses: Swatinem/rust-cache@v2
|
|
||||||
# with:
|
|
||||||
# cache-all-crates: "true"
|
|
||||||
# prefix-key: "macos-safari"
|
|
||||||
# - name: Run WASM tests with Safari, Firefox, Chrome
|
|
||||||
# run: |
|
|
||||||
# rustup target add wasm32-unknown-unknown
|
|
||||||
# curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
||||||
# cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.88" --force
|
|
||||||
# SAFARIDRIVER=$(which safaridriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt" --no-fail-fast
|
|
||||||
wasm-gecko:
|
wasm-gecko:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
@ -105,7 +82,7 @@ jobs:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
cache-dependency-path: server/package-lock.json
|
cache-dependency-path: server/package-lock.json
|
||||||
- name: Prepare and start Spacebar server
|
- name: Prepare and start Spacebar server
|
||||||
run: |
|
run: |
|
||||||
|
@ -134,7 +111,7 @@ jobs:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
cache-dependency-path: server/package-lock.json
|
cache-dependency-path: server/package-lock.json
|
||||||
- name: Prepare and start Spacebar server
|
- name: Prepare and start Spacebar server
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in New Issue