From e2aabe90148fda8492eba2269c0d732516b28d01 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 11:54:16 -0500 Subject: [PATCH 01/15] ci: use reusable workflow --- .github/workflows/ci.yml | 50 ++++++++-------------------------------- pyproject.toml | 3 ++- 2 files changed, 11 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1058aa1..6cc45b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,54 +21,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - run: pip install check-manifest && check-manifest + - run: pipx run check-manifest test: - name: ${{ matrix.platform }} (${{ matrix.python-version }}) - runs-on: ${{ matrix.platform }} + uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@main + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + pip-install-flags: ${{ github.event_name == 'schedule' && '--pre' || '' }} strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - platform: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.8", "3.10", "3.11", "3.12"] include: - - python-version: "3.12" + - python-version: "3.9" platform: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install -U pip - python -m pip install -e .[test] ${{ github.event_name == 'schedule' && '--pre' || '' }} - - - name: Test - run: pytest -v --cov=in_n_out --cov-report=xml --color=yes - - # If something goes wrong, we can open an issue in the repo - - name: Report --pre Failures - if: failure() && github.event_name == 'schedule' - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PLATFORM: ${{ matrix.platform }} - PYTHON: ${{ matrix.python-version }} - RUN_ID: ${{ github.run_id }} - TITLE: "[test-bot] pip install --pre is failing" - with: - filename: .github/TEST_FAIL_TEMPLATE.md - update_existing: true - - - name: Coverage - uses: codecov/codecov-action@v3 test_app_model: name: app-model diff --git a/pyproject.toml b/pyproject.toml index 7a569a7..5686c91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,7 @@ testpaths = ["tests"] filterwarnings = ["error"] [tool.coverage.run] -source = ['src/in_n_out'] +source = ['in_n_out'] command_line = "-m pytest" # https://coverage.readthedocs.io/en/6.4/config.html @@ -114,6 +114,7 @@ exclude_lines = [ ] show_missing = true + # https://mypy.readthedocs.io/en/stable/config_file.html [tool.mypy] files = "src/**/*.py" From c83316c437aa6377965fca5207e9155e85e37029 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 20:14:30 -0500 Subject: [PATCH 02/15] test-deps --- .github/workflows/ci.yml | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cc45b7..71ab60d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,37 +39,11 @@ jobs: platform: ubuntu-latest test_app_model: - name: app-model - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - path: in-n-out - - - uses: actions/checkout@v4 - with: - repository: pyapp-kit/app-model - path: app-model - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - - uses: tlambert03/setup-qt-libs@v1 - - - name: Install dependencies - run: | - python -m pip install -U pip - python -m pip install -e in-n-out[test] - python -m pip install -e app-model[qt,test,test-qt] - python -m pip install PyQt5 - - - name: Test - uses: GabrielBB/xvfb-action@v1 - with: - run: python -m pytest app-model --color=yes + uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@main + with: + package_to_test: pyapp-kit/app-model + package-extras: "qt,test,test-qt" + qt: "PyQt5" benchmarks: runs-on: ubuntu-latest From 1fb81b8a8c7533820a8b082781e81b50d1098b84 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 20:22:38 -0500 Subject: [PATCH 03/15] force From 97c84fde70f13d737708b204dd8b5e9e734095fc Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 20:26:01 -0500 Subject: [PATCH 04/15] force From 6ae6a2d1b7f7b1c7f2160445566a070cdb41a0ed Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 20:29:30 -0500 Subject: [PATCH 05/15] force From 45bedc507ae8ca3706d6d566946edc60bfa0b535 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 20:34:23 -0500 Subject: [PATCH 06/15] force From 03b2dc11e81785c317afb456c97c5c4fa65d6bd9 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 07:51:26 -0500 Subject: [PATCH 07/15] test failure message --- .github/workflows/ci.yml | 1 + tests/test_store.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71ab60d..73d58cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} pip-install-flags: ${{ github.event_name == 'schedule' && '--pre' || '' }} + report-failures: true strategy: fail-fast: false matrix: diff --git a/tests/test_store.py b/tests/test_store.py index e136cfd..2d6c35a 100644 --- a/tests/test_store.py +++ b/tests/test_store.py @@ -116,3 +116,7 @@ def func2(self) -> str: assert not test_store._providers assert not test_store._processors + + +def test_failure(): + assert False From 839b3531d6f7526fbf6d1a650f9cdccdae29c0e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 12:51:46 +0000 Subject: [PATCH 08/15] style(pre-commit.ci): auto fixes [...] --- tests/test_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_store.py b/tests/test_store.py index 2d6c35a..165ef1f 100644 --- a/tests/test_store.py +++ b/tests/test_store.py @@ -119,4 +119,4 @@ def func2(self) -> str: def test_failure(): - assert False + raise AssertionError() From 4942c78b340fd8531d4c0ba0d58cc7645eae0dc4 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 07:53:07 -0500 Subject: [PATCH 09/15] force From 94de2e2c2dccc5919598c798300c2a6dec4855f1 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 08:07:47 -0500 Subject: [PATCH 10/15] force From a81cf59bcbc30213c688977f51f4f27ac5f681b7 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 08:12:30 -0500 Subject: [PATCH 11/15] force From b8526a652852a826dbfb825df071fe2833972558 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 08:16:34 -0500 Subject: [PATCH 12/15] remove failure --- tests/test_store.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/test_store.py b/tests/test_store.py index 165ef1f..e136cfd 100644 --- a/tests/test_store.py +++ b/tests/test_store.py @@ -116,7 +116,3 @@ def func2(self) -> str: assert not test_store._providers assert not test_store._processors - - -def test_failure(): - raise AssertionError() From 47e073a54490160dd405c0dcd8190222c7e00ca4 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 08:20:14 -0500 Subject: [PATCH 13/15] update pip pre --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73d58cb..dcc7f3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: pull_request: workflow_dispatch: schedule: - - cron: "0 0 * * 0" # every week (for --pre release tests) + - cron: "0 0 * * *" # run daily concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -28,8 +28,8 @@ jobs: with: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} - pip-install-flags: ${{ github.event_name == 'schedule' && '--pre' || '' }} - report-failures: true + pip-install-pre-release: ${{ github.event_name == 'schedule' }} + report-failures: ${{ github.event_name == 'schedule' }} strategy: fail-fast: false matrix: From 1bcd10ed1ae94c896589d9e444f94e420f003b00 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 08:29:29 -0500 Subject: [PATCH 14/15] use v1 --- .github/workflows/ci.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcc7f3b..bcee3d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,8 @@ name: CI on: push: - branches: - - main - tags: - - "v*" + branches: [main] + tags: [v*] pull_request: workflow_dispatch: schedule: @@ -17,14 +15,13 @@ concurrency: jobs: check-manifest: - name: Check Manifest runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: pipx run check-manifest test: - uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@main + uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v1 with: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} @@ -39,8 +36,8 @@ jobs: - python-version: "3.9" platform: ubuntu-latest - test_app_model: - uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@main + test-app-model: + uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@v1 with: package_to_test: pyapp-kit/app-model package-extras: "qt,test,test-qt" @@ -64,7 +61,7 @@ jobs: deploy: name: Deploy - needs: test + needs: [test, check-manifest] if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule' runs-on: ubuntu-latest permissions: From be938636015b2d26172b4b39a61aa38b907a3cf4 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 6 Nov 2023 13:27:58 -0500 Subject: [PATCH 15/15] update --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcee3d6..d83baf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,8 +39,8 @@ jobs: test-app-model: uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@v1 with: - package_to_test: pyapp-kit/app-model - package-extras: "qt,test,test-qt" + dependency-repo: pyapp-kit/app-model + dependency-extras: "qt,test,test-qt" qt: "PyQt5" benchmarks: