2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-01-28 09:03:41 +00:00

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
This commit is contained in:
Matthias Mair
2026-01-14 12:03:23 +01:00
committed by GitHub
parent 8715151e4f
commit 22d6f7d191
3 changed files with 16 additions and 4 deletions

View File

@@ -39,6 +39,7 @@ jobs:
force: ${{ steps.force.outputs.force }} force: ${{ steps.force.outputs.force }}
cicd: ${{ steps.filter.outputs.cicd }} cicd: ${{ steps.filter.outputs.cicd }}
requirements: ${{ steps.filter.outputs.requirements }} requirements: ${{ steps.filter.outputs.requirements }}
runner-perf: ${{ steps.runner-perf.outputs.runner }}
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1
@@ -74,6 +75,10 @@ jobs:
if: | if: |
contains(github.event.pull_request.labels.*.name, 'dependency') || contains(github.event.pull_request.labels.*.name, 'dependency') ||
contains(github.event.pull_request.labels.*.name, 'full-run') 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: pre-commit:
name: Style [pre-commit] name: Style [pre-commit]
@@ -282,7 +287,7 @@ jobs:
python: python:
name: Tests - inventree-python name: Tests - inventree-python
runs-on: ubuntu-24.04 runs-on: ${{ needs.paths-filter.outputs.runner-perf }}
needs: ["pre-commit", "paths-filter"] needs: ["pre-commit", "paths-filter"]
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true' 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_SITE_URL: http://127.0.0.1:12345
INVENTREE_DEBUG: true INVENTREE_DEBUG: true
INVENTREE_LOG_LEVEL: WARNING INVENTREE_LOG_LEVEL: WARNING
node_version: '>=20.19.6'
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1
@@ -314,6 +320,7 @@ jobs:
apt-dependency: gettext poppler-utils apt-dependency: gettext poppler-utils
dev-install: true dev-install: true
update: true update: true
npm: true
- name: Download Python Code For `${WRAPPER_NAME}` - name: Download Python Code For `${WRAPPER_NAME}`
run: git clone --depth 1 https://github.com/inventree/${WRAPPER_NAME} ./${WRAPPER_NAME} run: git clone --depth 1 https://github.com/inventree/${WRAPPER_NAME} ./${WRAPPER_NAME}
- name: Start InvenTree Server - name: Start InvenTree Server
@@ -334,6 +341,8 @@ jobs:
pip install . pip install .
- name: Performance Reporting - name: Performance Reporting
uses: CodSpeedHQ/action@dbda7111f8ac363564b0c51b992d4ce76bb89f2f # pin@v4 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: with:
mode: walltime mode: walltime
run: pytest ./src/performance --codspeed run: pytest ./src/performance --codspeed
@@ -392,10 +401,11 @@ jobs:
performance: performance:
name: Tests - Performance name: Tests - Performance
runs-on: ubuntu-24.04 # codspeed-macro runs-on: ${{ needs.paths-filter.outputs.runner-perf }}
needs: ["pre-commit", "paths-filter"] 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: permissions:
contents: read contents: read
id-token: write id-token: write

View File

@@ -56,7 +56,7 @@ InvenTree is designed to be **extensible**, and provides multiple options for **
* [InvenTree API](https://docs.inventree.org/en/latest/api/) * [InvenTree API](https://docs.inventree.org/en/latest/api/)
* [Python module](https://docs.inventree.org/en/latest/api/python/) * [Python module](https://docs.inventree.org/en/latest/api/python/)
* [Plugin interface](https://docs.inventree.org/en/latest/plugins/) * [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/)
<!-- TechStack --> <!-- TechStack -->
### :space_invader: Tech Stack ### :space_invader: Tech Stack
@@ -200,6 +200,7 @@ Find a full list of used third-party libraries in the license information dialog
</a> </a>
<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a> <a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
<a href="https://crowdin.com"> <img src="https://crowdin.com/images/crowdin-logo.svg" alt="Translation by Crowdin" /> </a> <br> <a href="https://crowdin.com"> <img src="https://crowdin.com/images/crowdin-logo.svg" alt="Translation by Crowdin" /> </a> <br>
<a href="https://codspeed.io/inventree/InvenTree?utm_source=badge"><img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed Badge"/></a>
</p> </p>

View File

@@ -17,6 +17,7 @@ def main():
'available on your PYTHONPATH environment variable? Did you ' 'available on your PYTHONPATH environment variable? Did you '
'forget to activate a virtual environment?' 'forget to activate a virtual environment?'
) from exc ) from exc
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)