-
Notifications
You must be signed in to change notification settings - Fork 96
86 lines (74 loc) · 2.38 KB
/
ci-metricflow-unit-tests.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
name: Required Tests
on:
pull_request:
# run these jobs when a PR is opened, reopened, or updated (synchronize)
# synchronize = commit(s) pushed to the pull request
types:
- opened
- reopened
- synchronize
jobs:
metricflow-unit-tests-duckdb:
name: MetricFlow Tests (DuckDB)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- name: Check-out the repo
uses: actions/checkout@v3
- name: Test w/ Python ${{ matrix.python-version }}
uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ matrix.python-version }}
make-target: "test-include-slow"
metricflow-unit-tests-postgres:
name: MetricFlow Tests (PostgreSQL)
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: metricflow
POSTGRES_PASSWORD: metricflowing
POSTGRES_DB: metricflow
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check-out the repo
uses: actions/checkout@v3
- name: Test w/ Python 3.12
uses: ./.github/actions/run-mf-tests
with:
python-version: "3.12"
make-target: "test-postgresql"
metricflow-unit-tests:
name: MetricFlow Unit Tests
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [metricflow-unit-tests-duckdb, metricflow-unit-tests-postgres]
steps:
- name: Check success
run: test ${{ needs.metricflow-unit-tests-duckdb.result }} = 'success' -a ${{ needs.metricflow-unit-tests-postgres.result }} = 'success'
metricflow-package-tests:
name: MetricFlow Packages Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.12" ]
steps:
- name: Check-out the repo
uses: actions/checkout@v3
- name: Setup Python ${{ inputs.python-version }} Environment
uses: ./.github/actions/setup-python-env
with:
python-version: "${{ matrix.python-version }}"
- name: Test `metricflow-semantics` Package
run: bash scripts/ci_tests/metricflow_semantics_package_test.sh
- name: Test `metricflow` Package
run: bash scripts/ci_tests/metricflow_package_test.sh