-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.35 KB
/
ci.yml
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
name: CI
on:
push:
jobs:
CI:
name: Lint, build, test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pre-commit
run: |
sudo apt-get update
sudo apt-get install -y pre-commit
- name: Configure pre-commit cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
- name: Install minimal nightly with clippy and rustfmt
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt, clippy
- name: Install tool for formatting Cargo.toml files
run: cargo install cargo-tomlfmt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- name: Check pre-commit hooks (formatting and Clippy)
run: pre-commit run --all
- name: Build in debug mode
run: |
cargo build
- name: Spin up the test object store and postgres server
run: docker compose up -d --wait || true
- name: Run tests
run: |
cargo test
env:
AWS_ALLOW_HTTP: "true"
AWS_ENDPOINT: http://localhost:9000
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin