-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (36 loc) · 887 Bytes
/
test.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: Test
permissions: "write-all"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
POSTGRES_DB: testdb
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --all
env:
DATABASE_URL: postgres://testuser:testpassword@localhost:5432/testdb