-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (64 loc) · 1.83 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
on: [push]
name: CI
jobs:
build_and_test:
name: Covert test suite
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Start minio
run: |
docker run -d \
-p 9000:9000 \
--name minio \
minio/minio server /data
sleep 5
# Create bucket
docker run --rm --link minio -e MINIO_BUCKET=mybkt --entrypoint sh minio/mc -c "\
mc config host add myminio http://minio:9000 minioadmin minioadmin && \
mc rm -r --force myminio/\$MINIO_BUCKET || true && \
mc mb myminio/\$MINIO_BUCKET
"
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '^1.19.1'
- name: Install Litestream
run: |
git clone https://github.com/fmeringdal/litestream.git
cd litestream
go install -tags sqlcipher ./cmd/litestream
cd ..
litestream version
- uses: actions-rs/cargo@v1
name: Format
with:
command: fmt
args: --all --check
- uses: actions-rs/cargo@v1
name: Test
with:
command: test
args: --all --all-targets --all-features
- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: --all --all-targets --all-features -- -D warnings
- uses: actions-rs/cargo@v1
name: Build
with:
command: build
args: --release --all-features