@@ -43,12 +43,12 @@ jobs:
43
43
44
44
steps :
45
45
- name : Check out the repository
46
- uses : actions/checkout@v3
46
+ uses : actions/checkout@v4
47
47
with :
48
48
persist-credentials : false
49
49
50
50
- name : Set up Python
51
- uses : actions/setup-python@v4.3.0
51
+ uses : actions/setup-python@v4
52
52
with :
53
53
python-version : ' 3.9'
54
54
@@ -80,12 +80,12 @@ jobs:
80
80
81
81
steps :
82
82
- name : Check out the repository
83
- uses : actions/checkout@v3
83
+ uses : actions/checkout@v4
84
84
with :
85
85
persist-credentials : false
86
86
87
87
- name : Set up Python ${{ matrix.python-version }}
88
- uses : actions/setup-python@v4.3.0
88
+ uses : actions/setup-python@v4
89
89
with :
90
90
python-version : ${{ matrix.python-version }}
91
91
@@ -106,98 +106,45 @@ jobs:
106
106
run : |
107
107
echo "date=$(date +'%Y-%m-%dT%H_%M_%S')" >> $GITHUB_OUTPUT
108
108
109
- build :
110
- name : build packages
111
-
112
- runs-on : ubuntu-latest
113
-
114
- outputs :
115
- is_alpha : ${{ steps.check-is-alpha.outputs.is_alpha }}
116
-
117
- steps :
118
- - name : Check out the repository
119
- uses : actions/checkout@v3
120
- with :
121
- persist-credentials : false
122
-
123
- - name : Set up Python
124
-
125
- with :
126
- python-version : ' 3.9'
127
-
128
- - name : Install python dependencies
129
- run : |
130
- python -m pip install --user --upgrade pip
131
- python -m pip install --upgrade setuptools wheel twine check-wheel-contents
132
- python -m pip --version
133
-
134
- - name : Build distributions
135
- run : ./scripts/build-dist.sh
136
-
137
- - name : Show distributions
138
- run : ls -lh dist/
139
-
140
- - name : Check distribution descriptions
141
- run : |
142
- twine check dist/*
143
-
144
- - name : Check wheel contents
145
- run : |
146
- check-wheel-contents dist/*.whl --ignore W007,W008
147
-
148
- - name : Check if this is an alpha version
149
- id : check-is-alpha
150
- run : |
151
- export is_alpha=0
152
- if [[ "$(ls -lh dist/)" == *"a1"* ]]; then export is_alpha=1; fi
153
- echo "is_alpha=$is_alpha" >> $GITHUB_OUTPUT
154
-
155
109
test-build :
156
110
name : verify packages / python ${{ matrix.python-version }} / ${{ matrix.os }}
157
-
158
- if : needs.build.outputs.is_alpha == 0
159
-
160
- needs : build
161
-
162
111
runs-on : ${{ matrix.os }}
163
-
164
112
strategy :
165
113
fail-fast : false
166
114
matrix :
167
- os : [ubuntu-latest , macos-14, windows-latest ]
115
+ os : [ubuntu-22.04 , macos-14, windows-2022 ]
168
116
python-version : ['3.9', '3.10', '3.11']
117
+ dist-type : ["whl", "gz"]
169
118
exclude :
170
119
# psycopg2-binary doesn't have a precompiled wheel for python 3.9 for mac
171
120
- os : macos-14
172
121
python-version : ' 3.9'
173
-
174
122
steps :
175
- - name : Set up Python ${{ matrix.python-version }}
176
-
123
+ - uses : actions/checkout@v4
177
124
with :
178
- python-version : ${{ matrix.python-version }}
179
-
125
+ persist-credentials : false
126
+ - uses : actions/setup-python@v4
127
+ with :
128
+ python-version : ' 3.9'
180
129
- name : Install python dependencies
181
130
run : |
182
- python -m pip install --user --upgrade pip
183
- python -m pip install --upgrade wheel
131
+ python -m pip install --user --upgrade pip
132
+ python -m pip install --upgrade setuptools wheel twine check-wheel-contents
184
133
python -m pip --version
185
-
186
- - name : Show distributions
187
- run : ls -lh dist/
188
-
189
- - name : Install wheel distributions
190
- run : |
191
- find ./dist/*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
192
-
193
- - name : Check wheel distributions
194
- run : |
195
- dbt --version
196
-
197
- - name : Install source distributions
198
- run : |
199
- find ./dist/*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
200
-
201
- - name : Check source distributions
134
+ - if : matrix.os == 'macos-14'
135
+ run : brew install postgresql@14
136
+ - run : ./scripts/build-dist.sh
137
+ - run : ls -lh dist/
138
+ - run : twine check dist/*
139
+ - run : check-wheel-contents dist/*.whl --ignore W007,W008
140
+ - id : check-is-alpha
202
141
run : |
203
- dbt --version
142
+ export is_alpha=0
143
+ if [[ "$(ls -lh dist/)" == *"a1"* ]]; then export is_alpha=1; fi
144
+ echo "is_alpha=$is_alpha" >> $GITHUB_OUTPUT
145
+ - name : Install ${{ matrix.dist-type }} distributions
146
+ if : ${{ steps.check-is-alpha.outputs.is_alpha == 0 }}
147
+ run : find ./dist/*.${{ matrix.dist-type }} -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
148
+ - name : Check ${{ matrix.dist-type }} distributions
149
+ if : ${{ steps.check-is-alpha.outputs.is_alpha == 0 }}
150
+ run : python -c "import dbt.adapters.redshift"
0 commit comments