-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.08 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
name: CI
on:
push:
paths-ignore: [ README.md ]
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
- name: Install mongod (test dependency)
run: |
sudo apt-get install gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
--dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org-server
- name: Install rust
uses: dtolnay/rust-toolchain@nightly
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Run tests
run: cargo test