-
Notifications
You must be signed in to change notification settings - Fork 124
93 lines (79 loc) · 2.54 KB
/
unit.yaml
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
84
85
86
87
88
89
90
91
92
name: Unit Tests
on:
workflow_dispatch:
pull_request_target:
branches: [main]
merge_group:
env:
CARGO_TERM_COLOR: always
concurrency:
group: unit/${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
jobs:
# Run unit tests
unit:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
postgres:
image: debezium/postgres:13
ports:
- 5434:5432
env:
POSTGRES_DB: dozer_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ALLOW_IP_RANGE: 0.0.0.0/0
# command: postgres -c hba_file=/var/lib/stock-sample/pg_hba.conf
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: dozer-coverage
aws-region: us-east-2
- if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: 'recursive'
- if: github.event_name != 'pull_request_target'
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust cache
uses: swatinem/rust-cache@v2
- uses: ./.github/workflows/setup-snowflake-and-kafka
- uses: ./.github/workflows/setup-mysql-and-mariadb
- name: Run connectors tests
env:
SN_SERVER: ${{ secrets.SN_SERVER }}
SN_USER: ${{ secrets.SN_USER }}
SN_PASSWORD: ${{ secrets.SN_PASSWORD }}
SN_DATABASE: ${{ secrets.SN_DATABASE }}
SN_WAREHOUSE: ${{ secrets.SN_WAREHOUSE }}
SN_DRIVER: ${{ secrets.SN_DRIVER }}
shell: bash
run: |
cargo test \
-p dozer-ingestion-postgres \
-p dozer-ingestion-kafka \
-p dozer-ingestion-mysql \
--lib --no-fail-fast -- --ignored
- name: Run tests
shell: bash
run: |
source ./dozer-tests/python_udf/virtualenv.sh
cargo test --features snowflake,ethereum,kafka,python,mongodb --no-fail-fast