forked from meltano/meltano
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (82 loc) · 2.61 KB
/
integration_tests.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
84
85
86
87
88
89
90
91
92
name: Integration Tests
on:
pull_request:
paths:
- src/**
- integration/example-library/**
- noxfile.py
- pyproject.toml
- .github/workflows/integration_tests.yml
- .github/workflows/resources/constraints.txt
push:
branches: [main]
paths:
- src/**
- integration/example-library/**
- noxfile.py
- pyproject.toml
- .github/workflows/integration_tests.yml
- .github/workflows/resources/constraints.txt
workflow_dispatch:
inputs: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
validate:
strategy:
matrix:
include:
- { integration_test: "meltano-basics", needs_postgres: false}
- { integration_test: "meltano-run", needs_postgres: true}
- { integration_test: "meltano-objects", needs_postgres: false}
- { integration_test: "meltano-migrations", needs_postgres: false}
- { integration_test: "meltano-state-s3", needs_postgres: false}
- { integration_test: "meltano-state-local", needs_postgres: false}
- { integration_test: "meltano-config", needs_postgres: false}
- { integration_test: "meltano-annotations", needs_postgres: false}
- { integration_test: "meltano-manifest", needs_postgres: false}
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/[email protected]
- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/resources/constraints.txt
run: |
pipx install poetry
poetry --version
- name: Setup Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'
architecture: x64
cache: 'poetry'
- name: Upgrade pip
env:
PIP_CONSTRAINT: .github/workflows/resources/constraints.txt
run: |
pip install pip
pip --version
- name: Install Dependencies
run: |
poetry env use "3.10"
poetry install --extras "s3"
- name: Start Postgres Container
if: always() && (matrix.needs_postgres == true)
run: >
docker run -d
-p "5432:5432"
-e "POSTGRES_PASSWORD=postgres"
-e "POSTGRES_DB=warehouse"
--name postgres
--health-cmd "pg_isready -d postgres -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:11
- name: Run integration tests
run: |
poetry env use "3.10"
poetry run bash integration/validate.sh ${{ matrix.integration_test }}