1919 BIGQUERY_TESTING_AUTH_PROVIDER_X509_CERT_URL : ${{ secrets.BIGQUERY_TESTING_AUTH_PROVIDER_X509_CERT_URL }}
2020 BIGQUERY_TESTING_CLIENT_X509_CERT_URL : ${{ secrets.BIGQUERY_TESTING_CLIENT_X509_CERT_URL }}
2121 DBT_VERSION : 1.7
22+ PYTHON_VERSION : " 3.8.x"
2223
2324jobs :
25+ test-postgres :
26+ runs-on : ubuntu-latest
27+ if : github.event_name == 'push'
28+ services :
29+ postgres :
30+ image : postgres
31+ env :
32+ POSTGRES_PASSWORD : postgres
33+ # Set health checks to wait until postgres has started
34+ options : >-
35+ --health-cmd pg_isready
36+ --health-interval 10s
37+ --health-timeout 5s
38+ --health-retries 5
39+ ports :
40+ # Maps tcp port 5432 on service container to the host
41+ - 5432:5432
42+ steps :
43+ - name : Check out
44+ uses : actions/checkout@v2
45+
46+ - uses : actions/setup-python@v4
47+ with :
48+ python-version : ${{ env.PYTHON_VERSION }}
49+
50+ - name : Install dependencies
51+ working-directory : ./integration_tests
52+ run : |
53+ pip install -r requirements.txt
54+ pip install dbt-postgres==$DBT_VERSION
55+ dbt deps
56+
57+ - name : Test DB
58+ working-directory : ./integration_tests/python_tests
59+ run : pytest --db postgres --source_schema dq
60+
2461 test-other-dbs :
2562 runs-on : ubuntu-latest
26- if : github.event_name == 'push' && github.repository == 're-data/dbt-re-data'
63+ if : github.event_name == 'push' && github.repository == 're-data/dbt-re-data' && github.ref == 'refs/heads/master'
2764 strategy :
2865 fail-fast : false
2966 matrix :
3471
3572 - uses : actions/setup-python@v4
3673 with :
37- python-version : " 3.8.x "
74+ python-version : ${{ env.PYTHON_VERSION }}
3875
3976 - name : Inject slug/short variables
4077 uses : rlespinasse/github-slug-action@v3.x
@@ -71,45 +108,9 @@ jobs:
71108 run : |
72109 pytest --db ${{ matrix.database }} --source_schema ${{ env.DQ_SCHEMA }}
73110
74- test-postgres :
75- runs-on : ubuntu-latest
76- if : github.event_name == 'push'
77- services :
78- postgres :
79- image : postgres
80- env :
81- POSTGRES_PASSWORD : postgres
82- # Set health checks to wait until postgres has started
83- options : >-
84- --health-cmd pg_isready
85- --health-interval 10s
86- --health-timeout 5s
87- --health-retries 5
88- ports :
89- # Maps tcp port 5432 on service container to the host
90- - 5432:5432
91- steps :
92- - name : Check out
93- uses : actions/checkout@v2
94-
95- - uses : actions/setup-python@v4
96- with :
97- python-version : " 3.8.x"
98-
99- - name : Install dependencies
100- working-directory : ./integration_tests
101- run : |
102- pip install -r requirements.txt
103- pip install dbt-postgres==$DBT_VERSION
104- dbt deps
105-
106- - name : Test DB
107- working-directory : ./integration_tests/python_tests
108- run : pytest --db postgres --source_schema dq
109-
110111 clean-up-schemas :
111112 runs-on : ubuntu-latest
112- if : github.event_name == 'delete' && github.repository == 're-data/dbt-re-data'
113+ if : github.event_name == 'delete' && github.repository == 're-data/dbt-re-data' && github.ref == 'refs/heads/master'
113114 strategy :
114115 fail-fast : false
115116 matrix :
@@ -120,7 +121,7 @@ jobs:
120121
121122 - uses : actions/setup-python@v4
122123 with :
123- python-version : " 3.8.x "
124+ python-version : ${{ env.PYTHON_VERSION }}
124125
125126 - name : Inject slug/short variables
126127 uses : rlespinasse/github-slug-action@v3.x
0 commit comments