Skip to content

Commit

Permalink
/* PR_START p--misc 06 */ Update Github actions to use default Python…
Browse files Browse the repository at this point in the history
… version.
  • Loading branch information
plypaul committed Feb 7, 2025
1 parent 229d354 commit 126bfcc
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 53 deletions.
8 changes: 4 additions & 4 deletions .github/actions/run-mf-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ description: Runs MetricFlow using the specified Python version and engine setti
inputs:
python-version:
description: "Version of Python to use for testing."
required: true
required: False
default: "3.9"
mf_sql_engine_url:
description: "URL for configuring SQL engine connection."
required: false
Expand Down Expand Up @@ -39,12 +40,11 @@ inputs:
runs:
using: "composite"
steps:
- name: Setup Python ${{ inputs.python-version }} Environment
uses: ./.github/actions/setup-python-env
- uses: ./.github/actions/setup-python-env
with:
python-version: "${{ inputs.python-version }}"
hatch-environment-cache-config-json: "${{ inputs.hatch-environment-cache-config-json }}"
- name: Run Tests
- name: Run Tests w/ Python ${{ inputs.python-version }}
shell: bash
run: >
make -e
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/cd-push-dbt-metricflow-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
tags:
- "dbt-metricflow/v[0-9]+.[0-9]+.[0-9]+*"

env:
PYTHON_VERSION: "3.9"

jobs:
pypi-publish:
runs-on: ubuntu-latest
Expand All @@ -21,10 +18,7 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
uses: ./.github/actions/setup-python-env
with:
python-version: "${{ env.PYTHON_VERSION }}"
- uses: ./.github/actions/setup-python-env

- name: Build `dbt-metricflow` package
working-directory: ./dbt-metricflow
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/cd-push-metricflow-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"

env:
PYTHON_VERSION: "3.9"

jobs:
pypi-publish:
runs-on: ubuntu-latest
Expand All @@ -22,10 +19,7 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
uses: ./.github/actions/setup-python-env
with:
python-version: "${{ env.PYTHON_VERSION }}"
- uses: ./.github/actions/setup-python-env

- name: Build `metricflow` package
run: hatch build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:

env:
# Unclear on how to make 'Reload Test Data in SQL Engines' a constant here as it does not work here.
PYTHON_VERSION: "3.8"
ADDITIONAL_PYTEST_OPTIONS: "--log-cli-level info"

jobs:
Expand All @@ -28,10 +27,9 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Populate w/Python ${{ env.PYTHON_VERSION }}
- name: Populate Snowflake
uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
mf_sql_engine_url: ${{ secrets.MF_SNOWFLAKE_URL }}
mf_sql_engine_password: ${{ secrets.MF_SNOWFLAKE_PWD }}
parallelism: 1
Expand All @@ -47,10 +45,9 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Populate w/Python ${{ env.PYTHON_VERSION }}
- name: Populate Redshift
uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
mf_sql_engine_url: ${{ secrets.MF_REDSHIFT_URL }}
mf_sql_engine_password: ${{ secrets.MF_REDSHIFT_PWD }}
parallelism: 1
Expand All @@ -66,10 +63,9 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Populate w/Python ${{ env.PYTHON_VERSION }}
- name: Populate BigQuery
uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
MF_SQL_ENGINE_URL: ${{ secrets.MF_BIGQUERY_URL }}
MF_SQL_ENGINE_PASSWORD: ${{ secrets.MF_BIGQUERY_PWD }}
parallelism: 1
Expand All @@ -85,10 +81,9 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Populate w/Python ${{ env.PYTHON_VERSION }}
- name: Populate Databricks
uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
mf_sql_engine_url: ${{ secrets.MF_DATABRICKS_URL }}
mf_sql_engine_password: ${{ secrets.MF_DATABRICKS_PWD }}
parallelism: 1
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/cd-sql-engine-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
types: [labeled]

env:
PYTHON_VERSION: "3.8"
EXTERNAL_ENGINE_TEST_PARALLELISM: 8
ADDITIONAL_PYTEST_OPTIONS: "--use-persistent-source-schema"

Expand All @@ -25,10 +24,8 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python ${{ env.PYTHON_VERSION }}
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
mf_sql_engine_url: ${{ secrets.MF_SNOWFLAKE_URL }}
mf_sql_engine_password: ${{ secrets.MF_SNOWFLAKE_PWD }}
parallelism: ${{ env.EXTERNAL_ENGINE_TEST_PARALLELISM }}
Expand All @@ -50,10 +47,8 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python ${{ env.PYTHON_VERSION }}
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
mf_sql_engine_url: ${{ secrets.MF_REDSHIFT_URL }}
mf_sql_engine_password: ${{ secrets.MF_REDSHIFT_PWD }}
parallelism: ${{ env.EXTERNAL_ENGINE_TEST_PARALLELISM }}
Expand All @@ -75,10 +70,8 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python ${{ env.PYTHON_VERSION }}
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
MF_SQL_ENGINE_URL: ${{ secrets.MF_BIGQUERY_URL }}
MF_SQL_ENGINE_PASSWORD: ${{ secrets.MF_BIGQUERY_PWD }}
parallelism: ${{ env.EXTERNAL_ENGINE_TEST_PARALLELISM }}
Expand All @@ -100,10 +93,8 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python ${{ env.PYTHON_VERSION }}
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ env.PYTHON_VERSION }}
mf_sql_engine_url: ${{ secrets.MF_DATABRICKS_URL }}
mf_sql_engine_password: ${{ secrets.MF_DATABRICKS_PWD }}
parallelism: ${{ env.EXTERNAL_ENGINE_TEST_PARALLELISM }}
Expand Down Expand Up @@ -133,10 +124,8 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python 3.12
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: "3.12"
make-target: "test-trino"
hatch-environment-cache-config-json: >-
{
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci-linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ jobs:
pre-commit:
name: Run Pre-Commit Linting Hooks
runs-on: ubuntu-latest
env:
python-version: "3.8"
steps:

- name: Check-out the repo
uses: actions/checkout@v4

- name: Setup Python ${{ env.python-version }} Environment
uses: ./.github/actions/setup-python-env
- uses: ./.github/actions/setup-python-env
with:
python-version: "${{ env.python-version }}"
hatch-environment-cache-config-json: >-
{
"configs": [
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci-metricflow-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python ${{ matrix.python-version }}
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ matrix.python-version }}
make-target: "test-include-slow"
Expand All @@ -47,10 +46,8 @@ jobs:
- name: Check-out the repo
uses: actions/checkout@v4

- name: Test w/ Python 3.12
uses: ./.github/actions/run-mf-tests
- uses: ./.github/actions/run-mf-tests
with:
python-version: "3.12"
make-target: "test-postgresql"
hatch-environment-cache-config-json: >-
{
Expand Down

0 comments on commit 126bfcc

Please sign in to comment.