Split integration and unit tests, use runner for unit (#1134)
* Split integration and unit tests, use runner for unit * Probs does not need cache as network is slow
This commit is contained in:
parent
43afb2d702
commit
2a41768afa
1 changed files with 36 additions and 14 deletions
50
.github/workflows/rust.yml
vendored
50
.github/workflows/rust.yml
vendored
|
@ -41,7 +41,41 @@ jobs:
|
||||||
- name: Run cargo build main
|
- name: Run cargo build main
|
||||||
run: cargo build --all --locked --release && strip target/release/atuin
|
run: cargo build --all --locked --release && strip target/release/atuin
|
||||||
|
|
||||||
test:
|
unit-test:
|
||||||
|
runs-on: [self-hosted, ARM64, macOS]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install rust
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
# - uses: actions/cache@v3
|
||||||
|
# with:
|
||||||
|
# path: |
|
||||||
|
# ~/.cargo/registry
|
||||||
|
# ~/.cargo/git
|
||||||
|
# target
|
||||||
|
# key: ${ runner.os }-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
- name: Run cargo test
|
||||||
|
run: cargo test --lib --bins
|
||||||
|
|
||||||
|
- name: Run cargo check (all features)
|
||||||
|
run: cargo check --all-features --workspace
|
||||||
|
|
||||||
|
- name: Run cargo check (no features)
|
||||||
|
run: cargo check --no-default-features --workspace
|
||||||
|
|
||||||
|
- name: Run cargo check (sync)
|
||||||
|
run: cargo check --no-default-features --features sync --workspace
|
||||||
|
|
||||||
|
- name: Run cargo check (server)
|
||||||
|
run: cargo check --no-default-features --features server --workspace
|
||||||
|
|
||||||
|
integration-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -71,22 +105,10 @@ jobs:
|
||||||
key: ${ runner.os }-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
|
key: ${ runner.os }-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
run: cargo test --all-features --workspace
|
run: cargo test --test '*'
|
||||||
env:
|
env:
|
||||||
ATUIN_DB_URI: postgres://atuin:pass@localhost:5432/atuin
|
ATUIN_DB_URI: postgres://atuin:pass@localhost:5432/atuin
|
||||||
|
|
||||||
- name: Run cargo check (all features)
|
|
||||||
run: cargo check --all-features --workspace
|
|
||||||
|
|
||||||
- name: Run cargo check (no features)
|
|
||||||
run: cargo check --no-default-features --workspace
|
|
||||||
|
|
||||||
- name: Run cargo check (sync)
|
|
||||||
run: cargo check --no-default-features --features sync --workspace
|
|
||||||
|
|
||||||
- name: Run cargo check (server)
|
|
||||||
run: cargo check --no-default-features --features server --workspace
|
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue