diff --git a/.github/workflows/ci_test_package.yml b/.github/workflows/ci_test_package.yml index b714dfde..fe27cd14 100644 --- a/.github/workflows/ci_test_package.yml +++ b/.github/workflows/ci_test_package.yml @@ -44,7 +44,6 @@ jobs: permissions: contents: "read" id-token: "write" - services: postgres: image: postgres @@ -57,7 +56,6 @@ jobs: --health-retries 5 ports: - 5432:5432 - steps: - name: Get latest release uses: rez0n/actions-github-release@main @@ -66,37 +64,30 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.repository }} type: "stable" - - name: Checkout latest release uses: actions/checkout@v3 with: ref: ${{ steps.latest_release.outputs.release }} - - uses: actions/setup-python@v4 with: python-version: "3.8.x" architecture: "x64" - - name: Install tox run: python3 -m pip install tox - - id: auth-on-release if: ${{ matrix.warehouse == 'bigquery' }} uses: google-github-actions/auth@v1 with: workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} - - name: Build tables for latest release env: DBT_VERSION: "noversion" run: tox -e integration_${{ matrix.warehouse }} - - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR - # Need to get the auth file again - id: auth-on-pr if: ${{ matrix.warehouse == 'bigquery' }} @@ -104,10 +95,8 @@ jobs: with: workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} - - name: Run Tests on PR run: tox -e integration_${{ matrix.warehouse }}_${{ env.LAST_RELEASE_SUPPORTED_DBT_VERSION }} - single-run-different-versions: needs: integration strategy: @@ -122,7 +111,6 @@ jobs: permissions: contents: "read" id-token: "write" - services: postgres: image: postgres @@ -135,27 +123,21 @@ jobs: --health-retries 5 ports: - 5432:5432 - steps: - uses: actions/setup-python@v4 with: python-version: "3.8.x" architecture: "x64" - - name: Install tox run: python3 -m pip install tox - - name: Install SQL Server run: docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest - - name: Install Microsoft ODBC run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y - - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR - # Need to get the auth file again - id: auth-on-pr if: ${{ matrix.warehouse == 'bigquery' }} @@ -163,32 +145,26 @@ jobs: with: workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} - - name: Run Tests on PR env: DBT_VERSION: ${{ matrix.version }} run: tox -e integration_${{ matrix.warehouse }}_${{ matrix.version }} - # Databricks doesn't like the matrix strategy, so moving back to the old integration testing without versioning # integration-databricks: # runs-on: ubuntu-latest # environment: # name: Approve Integration Tests - # steps: # - name: Checkout # uses: actions/checkout@v3 # with: # ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR - # - uses: actions/setup-python@v4 # with: # python-version: '3.8.x' # architecture: 'x64' - # - name: Install tox # run: python3 -m pip install tox - # - name: Run Databricks Tests # env: # DBT_VERSION: '' @@ -197,6 +173,8 @@ jobs: integration-sqlserver: strategy: fail-fast: false # Don't fail one DWH if the others fail + matrix: + version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"] runs-on: ubuntu-latest environment: name: Approve Integration Tests @@ -231,18 +209,18 @@ jobs: - name: Run Tests on PR env: DBT_VERSION: ${{ matrix.version }} - run: tox -e integration_sqlserver + run: | + echo "Running tests for DBT version: ${{ matrix.version }}" + tox -e integration_sqlserver_${{ matrix.version }} integration-sqlserver-single-run: strategy: - fail-fast: false # Don't fail one DWH if the others fail + fail-fast: false # Don't fail one DWH if the others fail matrix: - # When supporting a new version, update the list here version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"] - run: tox -e integration_sqlserver_${{ matrix.version }} - runs-on: ubuntu-latest - environment: - name: Approve Integration Tests + runs-on: ubuntu-latest + environment: + name: Approve Integration Tests steps: - uses: actions/setup-python@v4 @@ -257,9 +235,9 @@ jobs: - name: Create DBT User shell: pwsh run: | - echo "Create dbt login with sysadmin" - sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests" - sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests" + echo "Create dbt login with sysadmin" + sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests" + sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests" - name: Install tox run: python3 -m pip install tox - name: Install Microsoft ODBC @@ -267,8 +245,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR + ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR - name: Run Tests on PR env: DBT_VERSION: ${{ matrix.version }} - run: tox -e integration_sqlserver_${{ matrix.version }} + run: | + echo "Running tests for DBT version: ${{ matrix.version }}" + tox -e integration-sqlserver-single-run_${{ matrix.version }} diff --git a/README.md b/README.md index fa3f6ef0..2a575c78 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ See the generated [dbt docs site](https://brooklyn-data.github.io/dbt_artifacts/ ``` packages: - package: brooklyn-data/dbt_artifacts - version: 2.7.0 + version: 2.7.1 ``` :construction_worker: Make sure to fix at least the **minor** version, to avoid issues when a new release is open. See the notes on upgrading below for more detail. diff --git a/dbt_project.yml b/dbt_project.yml index a02ad65a..9cba8340 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: "dbt_artifacts" -version: "2.7.0" +version: "2.7.1" config-version: 2 require-dbt-version: [">=1.3.0", "<1.9.0"] profile: "dbt_artifacts"