-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 941 Bytes
/
rust-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
name: Rust-ci
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
ports:
- 5432:5432
env:
POSTGRES_USER: rs_auth
POSTGRES_PASSWORD: password
POSTGRES_DB: rs_auth_db
options: >-
--health-cmd pg_isready
--health-interval 10ms
--health-timeout 500ms
--health-retries 15
steps:
- uses: actions/checkout@v3
- name: Set ENV variables
run: |
echo "DATABASE_URL=postgres://rs_auth:password@localhost:5432/rs_auth_db" >> .env
echo "JWT_TOKEN_SECRET=secret" >> .env
echo "JWT_REFRESH_TOKEN_SECRET=secret" >> .env
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose