From 784e3aea58bd14eca5d756b8d24ca1ca68551be5 Mon Sep 17 00:00:00 2001 From: Leah Antkiewicz Date: Wed, 11 Sep 2024 19:31:04 -0400 Subject: [PATCH] Isolating distribution testing --- .../Under the Hood-20240911-192855.yaml | 6 ++++ .github/workflows/main.yml | 33 ++++++++----------- 2 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20240911-192855.yaml diff --git a/.changes/unreleased/Under the Hood-20240911-192855.yaml b/.changes/unreleased/Under the Hood-20240911-192855.yaml new file mode 100644 index 000000000..2b203b8bb --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240911-192855.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Isolating distribution testing +time: 2024-09-11T19:28:55.992897-04:00 +custom: + Author: leahwicz + Issue: "874" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5acb4f7b5..06388518e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,7 @@ jobs: persist-credentials: false - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.8' @@ -83,7 +83,7 @@ jobs: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -125,7 +125,7 @@ jobs: persist-credentials: false - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.8' @@ -156,13 +156,13 @@ jobs: if [[ "$(ls -lh dist/)" == *"a1"* ]]; then export is_alpha=1; fi echo "is_alpha=$is_alpha" >> $GITHUB_OUTPUT - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: dist path: dist/ test-build: - name: verify packages / python ${{ matrix.python-version }} / ${{ matrix.os }} + name: verify packages / python ${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.dist-type }} if: needs.build.outputs.is_alpha == 0 @@ -173,22 +173,23 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, macos-12, windows-2022] + os: [ubuntu-latest, macos-12, windows-latest] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + dist-type: ['whl', 'gz'] steps: - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install python dependencies run: | - python -m pip install --user --upgrade pip + python -m pip install --user --upgrade pip python -m pip install --upgrade wheel python -m pip --version - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: dist path: dist/ @@ -196,18 +197,10 @@ jobs: - name: Show distributions run: ls -lh dist/ - - name: Install wheel distributions - run: | - find ./dist/*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ - - - name: Check wheel distributions - run: | - python -c "import dbt.adapters.redshift" - - - name: Install source distributions + - name: Install ${{ matrix.dist-type }} distributions run: | - find ./dist/*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ + find ./dist/*.${{ matrix.dist-type }} -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ - - name: Check source distributions + - name: Check ${{ matrix.dist-type }} distributions run: | python -c "import dbt.adapters.redshift"