-
Notifications
You must be signed in to change notification settings - Fork 97
83 lines (73 loc) · 2.48 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
83
name: Build and Test
on:
push:
branches: [main, release/*]
pull_request:
branches: [main, release/*]
paths: [nexus/**, protos/**, .github/workflows/ci.yml]
jobs:
build:
strategy:
matrix:
runner: [ubicloud-standard-2-ubuntu-2204-arm]
postgres-version: [13, 14, 15, 16, 17]
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
services:
catalog_peer:
image: postgres:${{ matrix.postgres-version }}-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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: generate or hydrate protos
uses: ./.github/actions/genprotos
- 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/create-json@b8e77fa01397ca39cc4a6198cc29a3be5481afef # v1.2.3
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/create-json@b8e77fa01397ca39cc4a6198cc29a3be5481afef # v1.2.3
with:
name: "snowflake_creds.json"
json: ${{ secrets.SNOWFLAKE_GH_CI_PKEY }}
dir: "nexus/server/tests/assets/"
- uses: ubicloud/rust-cache@69587b2b3f26e8938580c44a643d265ed12f3119 # v2
with:
workspaces: nexus
- name: cargo check
run: cargo check
working-directory: ./nexus
- name: cargo test
run: cargo test -- --test-threads=1
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