-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (60 loc) · 1.66 KB
/
tests.yml
File metadata and controls
60 lines (60 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This is the main CI workflow that runs the test suite on all pushes to main and all pull requests.
permissions:
contents: read
on:
push:
branches: [main]
paths:
- crates/**
- Cargo.toml
- Cargo.lock
- Dockerfile
pull_request:
paths:
- crates/**
- Cargo.toml
- Cargo.lock
- Dockerfile
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: unit-tests
jobs:
required:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: dev
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U dev"
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
# run on stable and beta to ensure that tests won't break on the next version of the rust
# toolchain
toolchain: [stable]
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
- name: cargo test
env:
COLUMNS: "80"
run: |
export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld"
cargo test --profile=ci --workspace --all-targets
cargo test --profile=ci --workspace --lib --features=state-store-query-test tests::statestore_queries_unittest