-
Notifications
You must be signed in to change notification settings - Fork 24
67 lines (65 loc) · 1.7 KB
/
build.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
60
61
62
63
64
65
66
67
name: Cross-platform build verification
on:
push:
branches:
- main
pull_request:
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- 1.56.0
- beta
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
- name: Build on Rust ${{ matrix.toolchain }}
run: |
cargo build --verbose --color always
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Run tests
run: |
cargo test --verbose --color always -- --show-output
env:
RAPID_GOSSIP_TEST_DB_HOST: localhost
RAPID_GOSSIP_TEST_DB_NAME: postgres
RAPID_GOSSIP_TEST_DB_USER: postgres
RAPID_GOSSIP_TEST_DB_PASSWORD: postgres
RAPID_GOSSIP_SYNC_SERVER_LOG_LEVEL: gossip