-
Notifications
You must be signed in to change notification settings - Fork 97
82 lines (72 loc) · 2.18 KB
/
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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build and Test
on:
push:
branches: [main, release/*]
pull_request:
branches: [main, release/*]
jobs:
build:
strategy:
matrix:
runner: [ubicloud-standard-2-ubuntu-2204-arm]
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
services:
catalog_peer:
image: debezium/postgres:14-alpine
ports:
- 7132:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- name: install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libssl-dev pkg-config build-essential
- name: setup gcp service account
id: gcp-service-account
uses: jsdaniell/[email protected]
with:
name: "bq_service_account.json"
json: ${{ secrets.GCP_GH_CI_PKEY }}
dir: "nexus/server/tests/assets/"
- name: setup snowflake credentials
id: sf-credentials
uses: jsdaniell/[email protected]
with:
name: "snowflake_creds.json"
json: ${{ secrets.SNOWFLAKE_GH_CI_PKEY }}
dir: "nexus/server/tests/assets/"
- uses: Swatinem/rust-cache@v2
with:
workspaces: nexus
- name: cargo check
run: cargo check
working-directory: ./nexus
- name: cargo test
run: cargo test
working-directory: ./nexus
env:
RUST_BACKTRACE: 1
PEERDB_CATALOG_HOST: localhost
PEERDB_CATALOG_PORT: 7132
PEERDB_CATALOG_DATABASE: postgres
PEERDB_CATALOG_USER: postgres
PEERDB_CATALOG_PASSWORD: postgres
TEST_BQ_CREDS: tests/assets/bq_service_account.json
TEST_SF_CREDS: tests/assets/snowflake_creds.json
PEERDB_LOG_DIR: /tmp
- name: dump server.log
if: failure()
run: cat nexus/server/server.log