From 320a9c19b44141d0272f9c2d11b16e20fa81221c Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Sun, 17 Mar 2024 21:28:59 -0700 Subject: [PATCH 1/4] try new python --- runtimes/python/plugin.yaml | 19 ++++++++++++++++++- tests/driver/lint_driver.ts | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/runtimes/python/plugin.yaml b/runtimes/python/plugin.yaml index ef5149eec..317101444 100644 --- a/runtimes/python/plugin.yaml +++ b/runtimes/python/plugin.yaml @@ -66,6 +66,22 @@ downloads: version: <=3.11.6 url: https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-${version}+20231002-${cpu}-${os}-install_only.tar.gz strip_components: 1 + - os: + linux: unknown-linux-gnu + macos: apple-darwin + cpu: + x86_64: x86_64 + arm_64: aarch64 + version: <=3.12.2 + url: https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-${version}+20240224-${cpu}-${os}-install_only.tar.gz + strip_components: 1 + - os: + windows: pc-windows-msvc-shared + cpu: + x86_64: x86_64 + version: <=3.12.2 + url: https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-${version}+20240224-${cpu}-${os}-install_only.tar.gz + strip_components: 1 runtimes: definitions: @@ -96,7 +112,8 @@ runtimes: - "${linter}/Scripts" # Windows places binaries here instead of bin/ - name: VIRTUAL_ENV value: ${linter} - known_good_version: 3.10.8 + # TODO: TYLER REVERT ME + known_good_version: 3.12.2 version_commands: - run: python3 --version parse_regex: Python ${semver} diff --git a/tests/driver/lint_driver.ts b/tests/driver/lint_driver.ts index b74a93b3a..6ccb63f9f 100644 --- a/tests/driver/lint_driver.ts +++ b/tests/driver/lint_driver.ts @@ -86,6 +86,7 @@ export class TrunkLintDriver extends GenericTrunkDriver { this.manualVersionReplacer = manualVersionReplacer; } + // TODO: TYLER REVERT PYTHON getTrunkYamlContents(trunkVersion: string | undefined): string { return `version: 0.1 cli: @@ -95,7 +96,7 @@ runtimes: # required in order to query latest - go@1.21.0 - node@18.12.1 - - python@3.10.8 + - python@3.12.2 - ruby@3.1.4 plugins: sources: From 547aa290365b46ab38e71e3c582ecacc8837e024 Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Sun, 17 Mar 2024 21:43:33 -0700 Subject: [PATCH 2/4] only test latest --- .github/workflows/pr.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 4e4241a72..7aaa93c29 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -131,16 +131,17 @@ jobs: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Linter Tests - # Run tests using KnownGoodVersion with any modified linters and conditionally all linters - uses: ./.github/actions/linter_tests - with: - linter-version: KnownGoodVersion - sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }} - append-args: - ${{ needs.detect_changes.outputs.all-linters }} ${{ - needs.detect_changes.outputs.linters-files }} - trunk-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }} + # TODO: TYLER READD + # - name: Linter Tests + # # Run tests using KnownGoodVersion with any modified linters and conditionally all linters + # uses: ./.github/actions/linter_tests + # with: + # linter-version: KnownGoodVersion + # sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }} + # append-args: + # ${{ needs.detect_changes.outputs.all-linters }} ${{ + # needs.detect_changes.outputs.linters-files }} + # trunk-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }} - name: Linter Tests Latest # Run tests on Latest with any modified linters (see filters.yaml). Don't run when cancelled. From b896188596c2f588148576ab74e1c6a4909d97af Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Sun, 17 Mar 2024 21:58:40 -0700 Subject: [PATCH 3/4] cleanup --- .github/workflows/pr.yaml | 21 ++++++++++----------- runtimes/python/plugin.yaml | 4 ++-- tests/driver/lint_driver.ts | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 7aaa93c29..4e4241a72 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -131,17 +131,16 @@ jobs: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # TODO: TYLER READD - # - name: Linter Tests - # # Run tests using KnownGoodVersion with any modified linters and conditionally all linters - # uses: ./.github/actions/linter_tests - # with: - # linter-version: KnownGoodVersion - # sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }} - # append-args: - # ${{ needs.detect_changes.outputs.all-linters }} ${{ - # needs.detect_changes.outputs.linters-files }} - # trunk-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }} + - name: Linter Tests + # Run tests using KnownGoodVersion with any modified linters and conditionally all linters + uses: ./.github/actions/linter_tests + with: + linter-version: KnownGoodVersion + sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }} + append-args: + ${{ needs.detect_changes.outputs.all-linters }} ${{ + needs.detect_changes.outputs.linters-files }} + trunk-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }} - name: Linter Tests Latest # Run tests on Latest with any modified linters (see filters.yaml). Don't run when cancelled. diff --git a/runtimes/python/plugin.yaml b/runtimes/python/plugin.yaml index 317101444..300eead83 100644 --- a/runtimes/python/plugin.yaml +++ b/runtimes/python/plugin.yaml @@ -66,6 +66,7 @@ downloads: version: <=3.11.6 url: https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-${version}+20231002-${cpu}-${os}-install_only.tar.gz strip_components: 1 + # Note that older versions of pylint, djlint, flake8 are not compatible with python@3.12 - os: linux: unknown-linux-gnu macos: apple-darwin @@ -112,8 +113,7 @@ runtimes: - "${linter}/Scripts" # Windows places binaries here instead of bin/ - name: VIRTUAL_ENV value: ${linter} - # TODO: TYLER REVERT ME - known_good_version: 3.12.2 + known_good_version: 3.10.8 version_commands: - run: python3 --version parse_regex: Python ${semver} diff --git a/tests/driver/lint_driver.ts b/tests/driver/lint_driver.ts index 6ccb63f9f..904431a4f 100644 --- a/tests/driver/lint_driver.ts +++ b/tests/driver/lint_driver.ts @@ -96,7 +96,7 @@ runtimes: # required in order to query latest - go@1.21.0 - node@18.12.1 - - python@3.12.2 + - python@3.10.8 - ruby@3.1.4 plugins: sources: From d919d5685cdd6f681822e6ef495f4cc3fc4c4279 Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Sun, 17 Mar 2024 21:59:52 -0700 Subject: [PATCH 4/4] cleanup --- tests/driver/lint_driver.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/driver/lint_driver.ts b/tests/driver/lint_driver.ts index 904431a4f..b74a93b3a 100644 --- a/tests/driver/lint_driver.ts +++ b/tests/driver/lint_driver.ts @@ -86,7 +86,6 @@ export class TrunkLintDriver extends GenericTrunkDriver { this.manualVersionReplacer = manualVersionReplacer; } - // TODO: TYLER REVERT PYTHON getTrunkYamlContents(trunkVersion: string | undefined): string { return `version: 0.1 cli: