-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (45 loc) · 1.39 KB
/
build_and_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
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build and Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main", "dev"]
env:
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: symfonia
POSTGRES_DB: symfonia
POSTGRES_USER: symfonia
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 3s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
prefix-key: "linux"
- name: Build and Test with Nextest
env:
DATABASE_HOST: postgres
DATABASE_USERNAME: symfonia
DATABASE_PASSWORD: symfonia
DATABASE_NAME: symfonia
DATABASE_PORT: 5432
# This is only important for tests
DATABASE_URL: postgres://symfonia:symfonia@postgres/symfonia
run: |
curl -L --proto '=https' --tlsv1.3 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall cargo-nextest --secure --no-confirm --force
cargo nextest run --all --verbose