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:
16
.github/workflows/qc_checks.yaml
vendored
16
.github/workflows/qc_checks.yaml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user