-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (40 loc) · 1.29 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
name: Build and Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main", "dev"]
env:
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: ikalnytskyi/action-setup-postgres@v6
with:
username: symfonia
password: trans-actional-database-haha-get-it
database: symfoniadb
port: 5432
id: postgres
- 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: trans-actional-database-haha-get-it
DATABASE_NAME: symfoniadb
DATABASE_PORT: 5432
SQLX_OFFLINE: true
# This is only important for tests
DATABASE_URL: ${{ steps.postgres.outputs.connection-uri }}
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