From 22d6f7d191603585c5efdc7d2618a02127b35f5c Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 14 Jan 2026 12:03:23 +0100 Subject: [PATCH] chore(ci): Re-enable codspeed runner (#11120) * re-enable codspeed runner * dummy change * add readme entry * do not run codspeed in forks * set node version * also set up node * fix link --- .github/workflows/qc_checks.yaml | 16 +++++++++++++--- README.md | 3 ++- src/backend/InvenTree/manage.py | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 06e8cab63f..c45c58ee54 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -39,6 +39,7 @@ jobs: force: ${{ steps.force.outputs.force }} cicd: ${{ steps.filter.outputs.cicd }} requirements: ${{ steps.filter.outputs.requirements }} + runner-perf: ${{ steps.runner-perf.outputs.runner }} steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 @@ -74,6 +75,10 @@ jobs: if: | contains(github.event.pull_request.labels.*.name, 'dependency') || contains(github.event.pull_request.labels.*.name, 'full-run') + - name: Which runner to use? + id: runner-perf + # decide if we are running in inventree/inventree -> use codspeed-macro runner else ubuntu-24.04 + run: echo "runner=$([[ '${{ github.repository }}' == 'inventree/InvenTree' ]] && echo 'codspeed-macro' || echo 'ubuntu-24.04')" >> $GITHUB_OUTPUT pre-commit: name: Style [pre-commit] @@ -282,7 +287,7 @@ jobs: python: name: Tests - inventree-python - runs-on: ubuntu-24.04 + runs-on: ${{ needs.paths-filter.outputs.runner-perf }} needs: ["pre-commit", "paths-filter"] if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true' @@ -303,6 +308,7 @@ jobs: INVENTREE_SITE_URL: http://127.0.0.1:12345 INVENTREE_DEBUG: true INVENTREE_LOG_LEVEL: WARNING + node_version: '>=20.19.6' steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 @@ -314,6 +320,7 @@ jobs: apt-dependency: gettext poppler-utils dev-install: true update: true + npm: true - name: Download Python Code For `${WRAPPER_NAME}` run: git clone --depth 1 https://github.com/inventree/${WRAPPER_NAME} ./${WRAPPER_NAME} - name: Start InvenTree Server @@ -334,6 +341,8 @@ jobs: pip install . - name: Performance Reporting uses: CodSpeedHQ/action@dbda7111f8ac363564b0c51b992d4ce76bb89f2f # pin@v4 + # check if we are in inventree/inventree - reporting only works in that OIDC context + if: github.repository == 'inventree/InvenTree' with: mode: walltime run: pytest ./src/performance --codspeed @@ -392,10 +401,11 @@ jobs: performance: name: Tests - Performance - runs-on: ubuntu-24.04 # codspeed-macro + runs-on: ${{ needs.paths-filter.outputs.runner-perf }} needs: ["pre-commit", "paths-filter"] - if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true' + # check if we are in inventree/inventree - reporting only works in that OIDC context + if: (needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true') && github.repository == 'inventree/InvenTree' permissions: contents: read id-token: write diff --git a/README.md b/README.md index 9d1dc34200..19a3644fe8 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ InvenTree is designed to be **extensible**, and provides multiple options for ** * [InvenTree API](https://docs.inventree.org/en/latest/api/) * [Python module](https://docs.inventree.org/en/latest/api/python/) * [Plugin interface](https://docs.inventree.org/en/latest/plugins/) -* [Third party tools](https://docs.inventree.org/en/latest/plugins/integrate/) +* [Third party tools](https://inventree.org/extend/integrate/) ### :space_invader: Tech Stack @@ -200,6 +200,7 @@ Find a full list of used third-party libraries in the license information dialog Deploys by Netlify Translation by Crowdin
+ CodSpeed Badge

diff --git a/src/backend/InvenTree/manage.py b/src/backend/InvenTree/manage.py index 988cd61e3f..9e1d7b6804 100755 --- a/src/backend/InvenTree/manage.py +++ b/src/backend/InvenTree/manage.py @@ -17,6 +17,7 @@ def main(): 'available on your PYTHONPATH environment variable? Did you ' 'forget to activate a virtual environment?' ) from exc + execute_from_command_line(sys.argv)