From 985bf35e3a4629313d51d32b95cf5a1c25df0a1e Mon Sep 17 00:00:00 2001 From: sydney-runkle Date: Tue, 12 Nov 2024 17:10:49 -0500 Subject: [PATCH 1/3] test-deps --- .github/workflows/daily_deps_test.yml | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/daily_deps_test.yml diff --git a/.github/workflows/daily_deps_test.yml b/.github/workflows/daily_deps_test.yml new file mode 100644 index 000000000..ad3ec602a --- /dev/null +++ b/.github/workflows/daily_deps_test.yml @@ -0,0 +1,62 @@ +name: Daily CI Job + +on: + schedule: + - cron: '0 12 * * *' # Daily at midnight UTC + + # Can be triggered manually from the actions tab, if needed + workflow_dispatch: + +jobs: + test: + name: test on Python ${{ matrix.python-version }} and pydantic ${{ matrix.pydantic-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pydantic-version: ['main'] + include: + - python-version: '3.12' + pydantic-version: '2.4' + - python-version: '3.12' + pydantic-version: '2.5' + - python-version: '3.12' + pydantic-version: '2.6' + - python-version: '3.12' + pydantic-version: '2.7' + - python-version: '3.12' + pydantic-version: '2.8' + - python-version: '3.12' + pydantic-version: '2.9' + env: + PYTHON: ${{ matrix.python-version }} + steps: + - uses: actions/checkout@v4 + + - name: Ensure requests to production domains fail + if: runner.os == 'Linux' + run: | + echo "203.0.113.0 logfire.dev" | sudo tee -a /etc/hosts + echo "203.0.113.0 logfire-api.pydantic.dev" | sudo tee -a /etc/hosts + echo "203.0.113.0 logfire.pydantic.dev" | sudo tee -a /etc/hosts + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.4.30" + enable-cache: true + + # upgrade deps to the latest versions for this daily test + - run: uv sync --python ${{ matrix.python-version }} --upgrade + + - name: Install pydantic ${{ matrix.pydantic-version }} + if: matrix.pydantic-version != 'main' + # installs the most recent patch on the minor version's track, ex 2.6.0 -> 2.6.4 + run: uv pip install 'pydantic==${{ matrix.pydantic-version }}.*' + + - run: uv run --no-sync pytest + + - name: Notify on failure + if: failure() + run: echo "Tests failed. TODO - send notification..." From 8e726413befa6898da48b9dbf4ff75d3cd25e8e8 Mon Sep 17 00:00:00 2001 From: sydney-runkle Date: Tue, 12 Nov 2024 17:12:36 -0500 Subject: [PATCH 2/3] run on PRs --- .github/workflows/daily_deps_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/daily_deps_test.yml b/.github/workflows/daily_deps_test.yml index ad3ec602a..73311c18c 100644 --- a/.github/workflows/daily_deps_test.yml +++ b/.github/workflows/daily_deps_test.yml @@ -3,6 +3,7 @@ name: Daily CI Job on: schedule: - cron: '0 12 * * *' # Daily at midnight UTC + pull_request: {} # temporary: run on PRs so we can test this workflow # Can be triggered manually from the actions tab, if needed workflow_dispatch: From 7d2674316f5be2ec65baf3a22b57ac9ad0509e33 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Wed, 13 Nov 2024 21:09:16 +0200 Subject: [PATCH 3/3] Remove temp line --- .github/workflows/daily_deps_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/daily_deps_test.yml b/.github/workflows/daily_deps_test.yml index 73311c18c..ad3ec602a 100644 --- a/.github/workflows/daily_deps_test.yml +++ b/.github/workflows/daily_deps_test.yml @@ -3,7 +3,6 @@ name: Daily CI Job on: schedule: - cron: '0 12 * * *' # Daily at midnight UTC - pull_request: {} # temporary: run on PRs so we can test this workflow # Can be triggered manually from the actions tab, if needed workflow_dispatch: