This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
110 lines (97 loc) · 2.71 KB
/
rust.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Rust
on:
push:
branches: [ "main", "trying", "staging" ]
pull_request:
merge_group:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --cfg=uuid_unstable
jobs:
checks:
runs-on: ubuntu-latest
name: Run Checks
env:
RUSTFLAGS: -D warnings --cfg=uuid_unstable
steps:
- uses: hecrj/setup-rust-action@v1
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets --all-features
- name: Test openssl
shell: bash {0}
run: cargo tree -p sqld -i openssl; [ $? = 101 ]
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-latest
name: Run Tests
env:
RUSTFLAGS: -D warnings --cfg=uuid_unstable
services:
minio:
image: lazybit/minio
ports:
- 9000:9000
- 9090:9090
env:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
volumes:
- /data
options: --name=minio --health-cmd "curl http://localhost:9000/minio/health/live"
steps:
- uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
env:
LIBSQL_BOTTOMLESS_AWS_ACCESS_KEY_ID: minioadmin
LIBSQL_BOTTOMLESS_AWS_SECRET_ACCESS_KEY: minioadmin
LIBSQL_BOTTOMLESS_AWS_DEFAULT_REGION: eu-central-2
LIBSQL_BOTTOMLESS_BUCKET: bottomless
LIBSQL_BOTTOMLESS_ENDPOINT: http://localhost:9000