mirror of
https://github.com/inventree/InvenTree.git
synced 2026-02-02 03:14:56 +00:00
* feat: matrix testing * remove unneeded args * remove hashes for now * remove require-hashes for now * try manually fixing cffi for now * remove wrong cache syntax * remove cache for now * move to 3.14? * make version specific install req * re-add hashes * Revert "remove require-hashes for now" This reverts commit7a7e12130a. * also compile requirements-dev * move more install commands * fix generation setting * more logging * remove cache exception * remove cffi fix * remove hash inforcement for now * remove dev for now * default to 3.14 to val * Revert "default to 3.14 to val" This reverts commit7a28e46604. * fix constraints * remove pin requirement from plugins.txt * do not use uv for now * do not use uv for now * fix test file format * revert small change * use 3.14 for benchmarks * keep tests on 3.11 * use invoke for install * try 3.14 for performance testing again * prolong time for slower CI on 3.14 * adjust dep versions * Keep performance ci on 3.12 Updated the Python version in the QC checks workflow.
106 lines
3.5 KiB
YAML
106 lines
3.5 KiB
YAML
name: 'Setup Enviroment'
|
|
description: 'Setup the environment for general InvenTree tests'
|
|
author: 'InvenTree'
|
|
inputs:
|
|
python:
|
|
required: false
|
|
description: 'Install python.'
|
|
default: 'true'
|
|
npm:
|
|
required: false
|
|
description: 'Install npm.'
|
|
default: 'false'
|
|
|
|
install:
|
|
required: false
|
|
description: 'Install the InvenTree requirements?'
|
|
default: 'false'
|
|
dev-install:
|
|
required: false
|
|
description: 'Install the InvenTree development requirements?'
|
|
default: 'false'
|
|
update:
|
|
required: false
|
|
description: 'Should a full update cycle be run?'
|
|
default: 'false'
|
|
|
|
apt-dependency:
|
|
required: false
|
|
description: 'Extra APT package for install.'
|
|
pip-dependency:
|
|
required: false
|
|
description: 'Extra python package for install.'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# Python installs
|
|
- name: Set up Python ${{ env.python_version }}
|
|
if: ${{ inputs.python == 'true' && env.python_version != '3.14' }}
|
|
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # pin@v5.0.0
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
src/backend/requirements.txt
|
|
src/backend/requirements-dev.txt
|
|
contrib/container/requirements.txt
|
|
contrib/dev_reqs/requirements.txt
|
|
- name: Setup Python 3.14
|
|
if: ${{ inputs.python == 'true' && env.python_version == '3.14' }}
|
|
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # pin@v5.0.0
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
- name: Install Base Python Dependencies
|
|
if: ${{ inputs.python == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install -U pip
|
|
pip3 install -U invoke wheel
|
|
pip3 install 'uv>=0.9.6'
|
|
- name: Allow uv to use the system Python by default
|
|
run: echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV
|
|
shell: bash
|
|
- name: Install Specific Python Dependencies
|
|
if: ${{ inputs.pip-dependency }}
|
|
shell: bash
|
|
run: uv pip install ${PIP_DEPS}
|
|
env:
|
|
PIP_DEPS: ${{ inputs.pip-dependency }}
|
|
|
|
# NPM installs
|
|
- name: Install node.js ${{ env.node_version }}
|
|
if: ${{ inputs.npm == 'true' }}
|
|
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # pin to v3.8.2
|
|
with:
|
|
node-version: ${{ env.node_version }}
|
|
# OS installs
|
|
- name: Install OS Dependencies
|
|
if: ${{ inputs.apt-dependency }}
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install ${APT_DEPS}
|
|
sudo apt-get install ${APT_DEPS}
|
|
env:
|
|
APT_DEPS: ${{ inputs.apt-dependency }}
|
|
|
|
# Invoke commands
|
|
- name: Install dev requirements
|
|
if: ${{ inputs.dev-install == 'true' || inputs.install == 'true' }}
|
|
shell: bash
|
|
run: invoke install --dev
|
|
- name: Run invoke install
|
|
if: ${{ inputs.install == 'true' }}
|
|
shell: bash
|
|
run: invoke install
|
|
- name: Run invoke update
|
|
if: ${{ inputs.update == 'true' }}
|
|
shell: bash
|
|
run: invoke update --skip-backup --skip-static
|