-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #497 from guenp/guenp/test-duckdb-nightly
Run tests with DuckDB nightly release every 24h
- Loading branch information
Showing
5 changed files
with
166 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# **what?** | ||
# Runs unit tests and functional tests using the latest nightly DuckDB build. | ||
# Any tests that use community extensions are skipped because these are not released nightly. | ||
|
||
# **why?** | ||
# Ensure code for dbt is compatible with the bleeding edge version of DuckDB. | ||
|
||
# **when?** | ||
# This will run nightly, after DuckDB releases its nightly build. | ||
|
||
name: Tests and Code Checks (DuckDB nightly) | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # every 24 hours, top of the hour | ||
workflow_dispatch: | ||
|
||
permissions: read-all | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
nightly: | ||
name: nightly test / python ${{ matrix.python-version }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
env: | ||
TOXENV: "nightly" | ||
PYTEST_ADDOPTS: "-v --color=yes --csv unit_results.csv" | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install tox | ||
python -m pip --version | ||
tox --version | ||
- name: Run tox | ||
run: tox | ||
|
||
- name: Get current date | ||
if: always() | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%dT%H_%M_%S')" >> $GITHUB_OUTPUT #no colons allowed for artifacts | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: unit_results_${{ matrix.python-version }}-${{ steps.date.outputs.date }}.csv | ||
path: unit_results.csv | ||
|
||
build: | ||
name: build packages | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install --upgrade setuptools wheel twine check-wheel-contents | ||
pip --version | ||
- name: Build distributions | ||
run: ./scripts/build-dist.sh | ||
|
||
- name: Show distributions | ||
run: ls -lh dist/ | ||
|
||
- name: Check distribution descriptions | ||
run: | | ||
twine check dist/* | ||
- name: Check wheel contents | ||
run: | | ||
check-wheel-contents dist/*.whl --ignore W002,W007,W008 | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
test-build: | ||
name: verify packages / python ${{ matrix.python-version }} / ${{ matrix.os }} | ||
|
||
needs: build | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install --upgrade wheel | ||
pip --version | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
- name: Show distributions | ||
run: ls -lh dist/ | ||
|
||
- name: Install wheel distributions | ||
run: | | ||
find ./dist/*.whl -maxdepth 1 -type f | xargs pip install --force-reinstall --find-links=dist/ | ||
- name: Check wheel distributions | ||
run: | | ||
dbt --version | ||
- name: Install source distributions | ||
run: | | ||
find ./dist/*.gz -maxdepth 1 -type f | xargs pip install --force-reinstall --find-links=dist/ | ||
- name: Check source distributions | ||
run: | | ||
dbt --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters