From da2308c100e9c0bba7dc3a714d88c3b36975ab10 Mon Sep 17 00:00:00 2001 From: leahwicz <60146280+leahwicz@users.noreply.github.com> Date: Fri, 22 Jul 2022 12:20:37 -0400 Subject: [PATCH 1/6] backport pr #403 to 1.1.latest, todo backport #405 --- .github/workflows/main.yml | 48 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fbdbbbaae..b81f60e2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,6 @@ on: push: branches: - "main" - - "develop" - "*.latest" - "releases/*" pull_request: @@ -40,6 +39,7 @@ jobs: name: ${{ matrix.toxenv }} runs-on: ubuntu-latest + timeout-minutes: 10 strategy: fail-fast: false @@ -58,28 +58,33 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 - with: + with: python-version: '3.8' - name: Install python dependencies run: | sudo apt-get install libsasl2-dev - pip install --user --upgrade pip - pip install tox - pip --version - tox --version - - name: Run tox - run: tox + python -m pip install --user --upgrade pip + python -m pip --version + python -m pip install mypy==0.942 + mypy --version + python -m pip install -r requirements.txt + python -m pip install -r dev-requirements.txt + dbt --version + + - name: Run pre-commit hooks + run: pre-commit run --all-files --show-diff-on-failure unit: name: unit test / python ${{ matrix.python-version }} runs-on: ubuntu-latest + timeout-minutes: 10 strategy: fail-fast: false matrix: - python-version: [3.7, 3.8] # TODO: support unit testing for python 3.9 (https://github.com/dbt-labs/dbt/issues/3689) + python-version: ["3.7", "3.8", "3.9", "3.10"] env: TOXENV: "unit" @@ -88,8 +93,6 @@ jobs: steps: - name: Check out the repository uses: actions/checkout@v2 - with: - persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 @@ -99,9 +102,9 @@ jobs: - name: Install python dependencies run: | sudo apt-get install libsasl2-dev - pip install --user --upgrade pip - pip install tox - pip --version + python -m pip install --user --upgrade pip + python -m pip --version + python -m pip install tox tox --version - name: Run tox run: tox @@ -128,8 +131,6 @@ jobs: steps: - name: Check out the repository uses: actions/checkout@v2 - with: - persist-credentials: false - name: Set up Python uses: actions/setup-python@v2 @@ -138,9 +139,10 @@ jobs: - name: Install python dependencies run: | - pip install --user --upgrade pip - pip install --upgrade setuptools wheel twine check-wheel-contents - pip --version + python -m pip install --user --upgrade pip + python -m pip install --upgrade setuptools wheel twine check-wheel-contents + python -m pip --version + - name: Build distributions run: ./scripts/build-dist.sh @@ -153,7 +155,7 @@ jobs: - name: Check wheel contents run: | check-wheel-contents dist/*.whl --ignore W007,W008 - + - name: Check if this is an alpha version id: check-is-alpha run: | @@ -179,7 +181,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.7, 3.8, 3.9] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - name: Set up Python ${{ matrix.python-version }} @@ -202,13 +204,13 @@ jobs: - name: Install wheel distributions run: | - find ./dist/*.whl -maxdepth 1 -type f | xargs pip install --force-reinstall --find-links=dist/ + find ./dist/*.whl -maxdepth 1 -type f | xargs python -m 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/ + find ./dist/*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ - name: Check source distributions run: | dbt --version From eedb68b016a0a1f5874835be602c40906f11a167 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Thu, 17 Nov 2022 10:48:52 -0600 Subject: [PATCH 2/6] add changes from #405 to backport --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b81f60e2b..a3dbb5f8b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -191,9 +191,9 @@ jobs: - name: Install python dependencies run: | - pip install --user --upgrade pip - pip install --upgrade wheel - pip --version + ppython -m pip install --user --upgrade pip + python -m pip install --upgrade wheel + python -m pip --version - uses: actions/download-artifact@v2 with: name: dist From 643bb66a99159678200ac55daf7cdf6b51bac89c Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Thu, 17 Nov 2022 10:52:10 -0600 Subject: [PATCH 3/6] typo fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a3dbb5f8b..340a13fca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -191,7 +191,7 @@ jobs: - name: Install python dependencies run: | - ppython -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@v2 From 1c9e1dfe7e13d158227c075cb840599ace3a5182 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Thu, 17 Nov 2022 11:05:56 -0600 Subject: [PATCH 4/6] dev_requirements name fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 340a13fca..316a048fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,7 +69,7 @@ jobs: python -m pip install mypy==0.942 mypy --version python -m pip install -r requirements.txt - python -m pip install -r dev-requirements.txt + python -m pip install -r dev_requirements.txt dbt --version - name: Run pre-commit hooks From 208d4b3e56e55c1a89b87713e574208643453acf Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Thu, 17 Nov 2022 11:08:54 -0600 Subject: [PATCH 5/6] remove ref to pre-commit as doesn't exist in this branch --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 316a048fc..c0823f918 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,9 +72,6 @@ jobs: python -m pip install -r dev_requirements.txt dbt --version - - name: Run pre-commit hooks - run: pre-commit run --all-files --show-diff-on-failure - unit: name: unit test / python ${{ matrix.python-version }} From 2a1e3192bfd30aa75e94f607a2f42767b3b5c100 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Thu, 17 Nov 2022 13:16:58 -0600 Subject: [PATCH 6/6] add skip that was missing on base test --- tests/functional/adapter/test_basic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index 70f3267a4..02469ba8c 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -79,5 +79,6 @@ def project_config_update(self): } } +@pytest.mark.skip_profile('spark_session') class TestBaseAdapterMethod(BaseAdapterMethod): pass \ No newline at end of file