Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split integration and unit tests, use runner for unit #1134

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 36 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,41 @@ jobs:
- name: Run cargo build main
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

services:
Expand Down Expand Up @@ -71,22 +105,10 @@ jobs:
key: ${ runner.os }-cargo-debug-${{ hashFiles('**/Cargo.lock') }}

- name: Run cargo test
run: cargo test --all-features --workspace
run: cargo test --test '*'
env:
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:
runs-on: ubuntu-latest

Expand Down