-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·59 lines (47 loc) · 1.49 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Setup .env files
run: |
echo "DATABASE_URL_LOCAL_USERS=${{ secrets.DATABASE_URL_LOCAL_USERS }}" >> .env
echo "POSTGRES_DB=${{ secrets.POSTGRES_DB }}" >> .env
echo "POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}" >> .env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> .env
- name: Start Services with Docker Compose
run: docker-compose up -d
- name: Install sqlx CLI
run: cargo install sqlx-cli
- name: Build server
run: |
cd server
cargo build --verbose --release
- name: Delay for all docker service startup # TODO: its good for now... but have to fix later
run: sleep 15
- name: Run tests in server
run: |
cd server
cargo test --verbose -- --nocapture
- name: Build & run tests in worker_wisdoms_checker
run: |
cd worker_wisdoms_checker
cargo build --verbose --release
cargo test --verbose -- --nocapture
- name: Build & run tests in worker_wisdoms_daily_rotator
run: |
cd worker_wisdoms_daily_rotator
cargo build --verbose --release
cargo test --verbose -- --nocapture