Skip to content

Commit

Permalink
Merge pull request #263 from dbt-labs/py312-finalization
Browse files Browse the repository at this point in the history
Update developer CI actions and package metadata to include Python 3.12
  • Loading branch information
tlento authored Feb 15, 2024
2 parents a2df138 + a49f043 commit 23e6318
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Setup Python env
description: Install Python & Hatch
inputs:
python-version:
description: Python version number to install
required: true

runs:
using: "composite"
steps:
- name: Set up Python 3.9
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: ${{ inputs.python-version }}

- name: Install Hatch
shell: bash
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci-pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ on:
jobs:
pre-commit:
name: Run Pre-commit Hooks
strategy:
matrix:
python-version: ["3.8", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-python-env
- name: Setup Python ${{ matrix.python-version }} env
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
# This step is necessary so long as we're allowing Pydantic 1 and Pydantic 2 via shimming
- name: Force Pydantic 1
run: hatch run dev-env:pip install "pydantic~=1.10"
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Set up Python ${{ matrix.python-version }} env
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch
shell: bash
run: pip3 install hatch
- name: Set pydantic Version ~= ${{ matrix.pydantic-version }}
run: hatch run dev-env:pip install "pydantic~=${{ matrix.pydantic-version }}"
- name: Run Python Tests
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci-schema-consistency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ on:
jobs:
json-schema-consistency-check:
name: Schema Consistency Check
strategy:
matrix:
python-version: ["3.8", "3.12"]
runs-on: ubuntu-latest
steps:
- name: Check-out the repo
uses: actions/checkout@v3

- name: Set up Python 3.9
- name: Set up Python ${{ matrix.python-version }} env
uses: ./.github/actions/setup-python-env
with:
python-version: "3.9"
python-version: ${{ matrix.python-version }}

- name: Generate JSON Schema
run: make json_schema
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down

0 comments on commit 23e6318

Please sign in to comment.