Skip to content

Commit 6b07009

Browse files
committed
Merge branch 'master' of https://github.com/inventree/InvenTree into pr/LqdBcnAtWork/9394
2 parents c55c53a + 6b261e1 commit 6b07009

File tree

897 files changed

+140209
-117748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

897 files changed

+140209
-117748
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN apt install -y \
3434
yarn nodejs npm
3535

3636
# Update to the latest stable node version
37-
RUN npm install -g n --ignore-scripts && n lts
37+
RUN npm install -g n@10.1.0 --ignore-scripts && n lts
3838

3939
RUN yarn config set network-timeout 600000 -g
4040

.devcontainer/postCreateCommand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ python3 -m pip install --upgrade pip
2727
pip3 install --ignore-installed --upgrade invoke Pillow
2828

2929
# install base level packages
30-
pip3 install -Ur --require-hashes contrib/container/requirements.txt
30+
pip3 install -Ur contrib/container/requirements.txt --require-hashes
3131

3232
# Run initial InvenTree server setup
3333
invoke update -s

.github/actions/setup/action.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ runs:
6464
- name: Install Specific Python Dependencies
6565
if: ${{ inputs.pip-dependency }}
6666
shell: bash
67-
run: uv pip install ${{ inputs.pip-dependency }}
67+
run: uv pip install ${PIP_DEPS}
68+
env:
69+
PIP_DEPS: ${{ inputs.pip-dependency }}
6870

6971
# NPM installs
7072
- name: Install node.js ${{ env.node_version }}
@@ -78,8 +80,10 @@ runs:
7880
shell: bash
7981
run: |
8082
sudo apt-get update
81-
sudo apt-get install ${{ inputs.apt-dependency }}
82-
sudo apt-get install ${{ inputs.apt-dependency }}
83+
sudo apt-get install ${APT_DEPS}
84+
sudo apt-get install ${APT_DEPS}
85+
env:
86+
APT_DEPS: ${{ inputs.apt-dependency }}
8387

8488
# Invoke commands
8589
- name: Install dev requirements

.github/dependabot.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@ updates:
2323
directories:
2424
- /docs
2525
- /contrib/dev_reqs
26-
schedule:
27-
interval: weekly
28-
day: friday
29-
groups:
30-
dependencies:
31-
patterns:
32-
- "*" # Include all dependencies
33-
assignees:
34-
- "matmair"
35-
versioning-strategy: increase
36-
37-
- package-ecosystem: pip
38-
directories:
3926
- /contrib/container
4027
- /src/backend
4128
schedule:
@@ -52,7 +39,6 @@ updates:
5239
- package-ecosystem: npm
5340
directories:
5441
- /src/frontend
55-
- /src/backend
5642
schedule:
5743
interval: weekly
5844
groups:

.github/workflows/docker.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
with:
7373
persist-credentials: false
7474
- name: Set Up Python ${{ env.python_version }}
75-
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # pin@v5.5.0
75+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # pin@v5.6.0
7676
with:
7777
python-version: ${{ env.python_version }}
7878
- name: Version Check
@@ -120,6 +120,7 @@ jobs:
120120
test -f data/config.yaml
121121
test -f data/plugins.txt
122122
test -f data/secret_key.txt
123+
test -f data/oidc.pem
123124
- name: Run Unit Tests
124125
run: |
125126
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> contrib/container/docker.dev.env
@@ -138,7 +139,7 @@ jobs:
138139
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # [email protected]
139140
- name: Set up cosign
140141
if: github.event_name != 'pull_request'
141-
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # [email protected].1
142+
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # [email protected].2
142143
- name: Check if Dockerhub login is required
143144
id: docker_login
144145
run: |

.github/workflows/qc_checks.yaml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
with:
8787
persist-credentials: false
8888
- name: Set up Python ${{ env.python_version }}
89-
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # pin@v5.5.0
89+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # pin@v5.6.0
9090
with:
9191
python-version: ${{ env.python_version }}
9292
cache: "pip"
@@ -109,7 +109,7 @@ jobs:
109109
with:
110110
persist-credentials: false
111111
- name: Set up Python ${{ env.python_version }}
112-
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # pin@v5.5.0
112+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # pin@v5.6.0
113113
with:
114114
python-version: ${{ env.python_version }}
115115
- name: Check Config
@@ -193,7 +193,6 @@ jobs:
193193
diff -u src/backend/InvenTree/schema.yml api.yaml && echo "no difference in API schema " || exit 2
194194
- name: Check schema - including warnings
195195
run: invoke dev.schema
196-
continue-on-error: true
197196
- name: Extract version for publishing
198197
id: version
199198
if: github.ref == 'refs/heads/master' && needs.paths-filter.outputs.api == 'true'
@@ -203,22 +202,22 @@ jobs:
203202
echo "Version: $version"
204203
echo "version=$version" >> "$GITHUB_OUTPUT"
205204
- name: Extract settings / tags
206-
run: invoke int.export-definitions --basedir src/backend/InvenTree
205+
run: invoke int.export-definitions --basedir docs
207206
- name: Upload settings
208207
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # [email protected]
209208
with:
210209
name: inventree_settings.json
211-
path: src/backend/InvenTree/inventree_settings.json
210+
path: docs/generated/inventree_settings.json
212211
- name: Upload tags
213212
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # [email protected]
214213
with:
215214
name: inventree_tags.yml
216-
path: src/backend/InvenTree/inventree_tags.yml
215+
path: docs/generated/inventree_tags.yml
217216
- name: Upload filters
218217
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # [email protected]
219218
with:
220219
name: inventree_filters.yml
221-
path: src/backend/InvenTree/inventree_filters.yml
220+
path: docs/generated/inventree_filters.yml
222221

223222
schema-push:
224223
name: Push new schema
@@ -238,7 +237,7 @@ jobs:
238237
- name: Create artifact directory
239238
run: mkdir -p artifact
240239
- name: Download schema artifact
241-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # pin@v4.2.1
240+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # pin@v4.3.0
242241
with:
243242
path: artifact
244243
merge-multiple: true
@@ -255,7 +254,7 @@ jobs:
255254
echo "after move"
256255
ls -la artifact
257256
rm -rf artifact
258-
- uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # pin@v5.1.0
257+
- uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # pin@v5.2.0
259258
name: Commit schema changes
260259
with:
261260
commit_message: "Update API schema for ${{ env.version }} / ${{ github.sha }}"
@@ -343,8 +342,14 @@ jobs:
343342
run: python3 .github/scripts/check_migration_files.py
344343
- name: Coverage Tests
345344
run: invoke dev.test --coverage --translations
345+
- name: Upload raw coverage to artifacts
346+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # [email protected]
347+
with:
348+
name: coverage
349+
path: .coverage
350+
retention-days: 14
346351
- name: Upload coverage reports to Codecov
347-
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # [email protected].0
352+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # [email protected].3
348353
if: always()
349354
with:
350355
token: ${{ secrets.CODECOV_TOKEN }}
@@ -487,7 +492,7 @@ jobs:
487492
- name: Run Tests
488493
run: invoke dev.test --migrations --report --coverage --translations
489494
- name: Upload coverage reports to Codecov
490-
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # [email protected].0
495+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # [email protected].3
491496
if: always()
492497
with:
493498
token: ${{ secrets.CODECOV_TOKEN }}
@@ -554,7 +559,7 @@ jobs:
554559
chmod +rw /home/runner/work/InvenTree/db.sqlite3
555560
invoke migrate
556561
557-
platform_ui:
562+
web_ui:
558563
name: Tests - Web UI
559564
runs-on: ubuntu-24.04
560565
timeout-minutes: 60
@@ -584,7 +589,7 @@ jobs:
584589
INVENTREE_DB_PASSWORD: inventree_password
585590
INVENTREE_DEBUG: true
586591
INVENTREE_PLUGINS_ENABLED: false
587-
VITE_COVERAGE: true
592+
VITE_COVERAGE_BUILD: true
588593

589594
steps:
590595
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # [email protected]
@@ -599,13 +604,13 @@ jobs:
599604
apt-dependency: postgresql-client libpq-dev
600605
pip-dependency: psycopg2
601606
- name: Set up test data
602-
run: invoke dev.setup-test -iv
603-
- name: Rebuild thumbnails
604-
run: invoke int.rebuild-thumbnails
607+
run: |
608+
invoke dev.setup-test -iv
609+
invoke int.rebuild-thumbnails
605610
- name: Install dependencies
606-
run: invoke int.frontend-compile
607-
- name: Install Playwright Browsers
608-
run: cd src/frontend && npx playwright install --with-deps
611+
run: |
612+
invoke int.frontend-compile
613+
cd src/frontend && npx playwright install --with-deps
609614
- name: Run Playwright tests
610615
id: tests
611616
run: cd src/frontend && npx nyc playwright test
@@ -616,24 +621,25 @@ jobs:
616621
path: src/frontend/playwright-report/
617622
retention-days: 14
618623
- name: Report coverage
619-
if: always()
624+
if: github.event_name != 'pull_request'
620625
run: cd src/frontend && npx nyc report --report-dir ./coverage --temp-dir .nyc_output --reporter=lcov --exclude-after-remap false
621626
- name: Upload coverage reports to Codecov
622-
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # [email protected].0
623-
if: always()
627+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # [email protected].3
628+
if: github.event_name != 'pull_request'
624629
with:
625630
token: ${{ secrets.CODECOV_TOKEN }}
626631
slug: inventree/InvenTree
627632
flags: web
628633
- name: Upload bundler info
634+
if: github.event_name != 'pull_request'
629635
env:
630636
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
631637
run: |
632638
cd src/frontend
633639
yarn install
634640
yarn run build
635641
636-
platform_ui_build:
642+
web_ui_build:
637643
name: Build - Web UI
638644
runs-on: ubuntu-24.04
639645
timeout-minutes: 60
@@ -681,7 +687,7 @@ jobs:
681687
env:
682688
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
683689
- name: Upload SARIF file
684-
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # pin@v3
690+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # pin@v3
685691
with:
686692
sarif_file: results.sarif
687693
category: zizmor

.github/workflows/release.yaml

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ on:
66
types: [published]
77
permissions:
88
contents: read
9+
env:
10+
python_version: 3.9
911

1012
jobs:
1113
stable:
12-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1315
name: Write release to stable branch
1416
permissions:
1517
contents: write
@@ -34,7 +36,7 @@ jobs:
3436
force: true
3537

3638
build:
37-
runs-on: ubuntu-latest
39+
runs-on: ubuntu-24.04
3840
name: Build and attest frontend
3941
permissions:
4042
id-token: write
@@ -53,7 +55,7 @@ jobs:
5355
- name: Build frontend
5456
run: cd src/frontend && npm run compile && npm run build
5557
- name: Create SBOM for frontend
56-
uses: anchore/sbom-action@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # pin@v0
58+
uses: anchore/sbom-action@e11c554f704a0b820cbf8c51673f6945e0731532 # pin@v0
5759
with:
5860
artifact-name: frontend-build.spdx
5961
path: src/frontend
@@ -69,7 +71,7 @@ jobs:
6971
zip -r ../frontend-build.zip * .vite
7072
- name: Attest Build Provenance
7173
id: attest
72-
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # pin@v1
74+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # pin@v1
7375
with:
7476
subject-path: "${{ github.workspace }}/src/backend/InvenTree/web/static/frontend-build.zip"
7577

@@ -89,3 +91,46 @@ jobs:
8991
file: ${{ steps.attest.outputs.bundle-path}}
9092
tag: ${{ github.ref }}
9193
overwrite: true
94+
95+
docs:
96+
runs-on: ubuntu-24.04
97+
name: Build and publish documentation
98+
permissions:
99+
contents: write
100+
env:
101+
INVENTREE_DB_ENGINE: sqlite3
102+
INVENTREE_DB_NAME: inventree
103+
INVENTREE_MEDIA_ROOT: /home/runner/work/InvenTree/test_inventree_media
104+
INVENTREE_STATIC_ROOT: /home/runner/work/InvenTree/test_inventree_static
105+
INVENTREE_BACKUP_DIR: /home/runner/work/InvenTree/test_inventree_backup
106+
INVENTREE_SITE_URL: http://localhost:8000
107+
INVENTREE_DEBUG: true
108+
109+
steps:
110+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # [email protected]
111+
with:
112+
persist-credentials: false
113+
- name: Environment Setup
114+
uses: ./.github/actions/setup
115+
with:
116+
install: true
117+
npm: true
118+
- name: Install dependencies
119+
run: |
120+
pip install --require-hashes -r contrib/dev_reqs/requirements.txt
121+
pip install --require-hashes -r docs/requirements.txt
122+
- name: Build documentation
123+
run: |
124+
invoke build-docs --mkdocs
125+
- name: Zip build docs
126+
run: |
127+
cd docs/site
128+
zip -r docs-html.zip *
129+
- name: Publish documentation
130+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # [email protected]
131+
with:
132+
repo_token: ${{ secrets.GITHUB_TOKEN }}
133+
file: docs/site/docs-html.zip
134+
asset_name: docs-html.zip
135+
tag: ${{ github.ref }}
136+
overwrite: true

.github/workflows/scorecard.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
persist-credentials: false
3838

3939
- name: "Run analysis"
40-
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
40+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
4141
with:
4242
results_file: results.sarif
4343
results_format: sarif
@@ -67,6 +67,6 @@ jobs:
6767

6868
# Upload the results to GitHub's code scanning dashboard.
6969
- name: "Upload to code-scanning"
70-
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
70+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
7171
with:
7272
sarif_file: results.sarif

.github/workflows/translations.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ jobs:
4949
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
5050
git config --local user.name "github-actions[bot]"
5151
git add src/backend/InvenTree/locale/en/LC_MESSAGES/django.po src/frontend/src/locales/en/messages.po
52+
echo "Adding commit (or ignoring if no changes)"
5253
git commit -m "add translations" || true
54+
echo "Removing all other changes"
5355
git reset --hard
54-
git reset HEAD~
56+
echo "Resetting to HEAD~"
57+
git reset HEAD~ || true
5558
- name: crowdin action
56-
uses: crowdin/github-action@2cc7959c565767d6bc118118d6df3b63bf361370 # pin@v2
59+
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # pin@v2
5760
with:
5861
upload_sources: true
5962
upload_translations: false

0 commit comments

Comments
 (0)