mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-05 06:48:48 +00:00
* Remove stat context variables * Revert "Remove stat context variables" This reverts commit 0989c308d0cea9b9405a1338d257b542c6d33d73. * remove old backport * move requirements * move isort * move migrations-tests * add pip-tools as req and add hook * Use hashes and also run when txt files are added * Update to hashes in requirements * update requirements install path * remove allauth-2fa for a test * install dev-requirements * re-enable allauth * remove hashes from pre normal setup * Remove version bindings if they are the laest * move depencies to upper bound * fix django-money * remove windows specific requirements * also install dependencies * update markdownify * remove django-admin-shell * remove unneeded packages * add docs * remove pins and fix pre-commit pipeline * pin django-money * really remove admin shell * return default behaviour for money serializer * pip fix * update filter name * set decimal for output * add migrations * pin coveralls * update requirements Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
91 lines
2.6 KiB
YAML
91 lines
2.6 KiB
YAML
name: 'Setup Enviroment'
|
|
description: 'Setup the enviroment 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@v2
|
|
|
|
# Python installs
|
|
- name: Set up Python ${{ env.python_version }}
|
|
if: ${{ inputs.python == 'true' }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
cache: pip
|
|
- name: Install Base Python Dependencies
|
|
if: ${{ inputs.python == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install -U pip
|
|
pip3 install invoke wheel
|
|
- name: Install Specific Python Dependencies
|
|
if: ${{ inputs.pip-dependency }}
|
|
shell: bash
|
|
run: pip3 install ${{ inputs.pip-dependency }}
|
|
|
|
# NPM installs
|
|
- name: Install node.js ${{ env.node_version }}
|
|
if: ${{ inputs.npm == 'true' }}
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ env.node_version }}
|
|
cache: 'npm'
|
|
- name: Intall npm packages
|
|
if: ${{ inputs.npm == 'true' }}
|
|
shell: bash
|
|
run: npm install
|
|
|
|
# OS installs
|
|
- name: Install OS Dependencies
|
|
if: ${{ inputs.apt-dependency }}
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install ${{ inputs.apt-dependency }}
|
|
|
|
# Invoke commands
|
|
- name: Install dev requirements
|
|
if: ${{ inputs.dev-install == 'true' ||inputs.install == 'true' }}
|
|
shell: bash
|
|
run: pip install -r requirements-dev.txt
|
|
- 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
|