Commit Graph

318 Commits

Author SHA1 Message Date
Matthias Mair
f227315ad1
P-UI: Fast language / theme / server selection (#5301)
* added language toggle component

* added language and theme controls onto start page

* moved host selection out of auth

* optimized rendering

* make server option less obvious

* changed EditButton save symbol

* longer welcome text

* removed ColorToggle color schema

* reduced code

* disabled host selection when options are changing

* fix type error

* use GH reporter

* fix tests?

* compile frontend

* fix assertation

* revert unneeded change

* split up into more components

* separated functions / use cases for LanguageToggle more

* moved color toggle to profile

* moved language out of main menu into profile

* remapped settings link
2023-07-22 22:19:19 +10:00
Matthias Mair
9fe77b20e4
P-UI: Adapt translation CI (#5299)
* Fixes up translation for P-UI
Closes [FR/P-UI] Translation integration #5282

* ammended crowdin settings
2023-07-21 09:00:37 +10:00
Matthias Mair
2259de7f31
P UI: Added frontend publishing for bare-metal (git) (#5277)
* Add SPA views for react #2789

* split up frontend urls

* Add settings for frontend url loading

* add new UI scaffold

* remove tracking insert

* add platform app

* ensure static indexes work too

* add lingui

* add lingui config

* add mgmt tasks

* add base locales

* settings for frontend dev

* fix typo

* update deps

* add pre-commit

* add eslint

* add testing scaffold

* fix paths

* remove error - tests trip correctly

* merge workflow

* cleanup samples

* use name inline with other tests

* Add real worl frontend tests

* setup env

* tun migrations first

* optimize setup time

* setup demo dataset

* optimize run setup

* add test for class ui

* rename

* fix typo

* and another typo

* do install

* run migrations first

* fix name

* cleanup

* use other credentials

* use other credentials

* fix qc

* move envs to qc

* remove create_site

* reduce testing env

* fix test

* fix test call

* allaccess user

* add ui plattform check

* add better check

* remove unneeded env

* enable debug

* reduce wait time

* also build frontend on static

* add sort plugin

* fix order

* run pre-commit fixes

* add node min version

* Docker container (#129)

* Fix allocation check for completing build order (#5199)

- Allocation check only applies to untracked line items

* docker dev

Install required node packages to docker development image

* add import order settings

* cleanout built ui

* remove default arg from build

* remove eslint

* optimize svg

* add build step for plattform UI

* fix install command

* use alpine commands

* do not use cache when creating image

* Added release pipeline

* trigger: ci

* Fix ci

* Fix ci

* Fix ci

* fix: workflow

* fix: workflow

* fix: doubble zipping

* fix: doubble zipping

* fix: doubble zipping

* fix: doubble zipping

* fix: doubble zipping

* Added frontend-download helper to tasks.py

* revert unrelated change

* Add frontend step to update task

* add frontend stuff to version info

* small change to trigger ci

* keep terminal output clean

* return found versions

* fix suggested command

* revert small change

* move to multiline

* add flag to stop frontend compile

* make node building optional on static

* add node trans to transalte task

* ammend commands to use new flag

* remove unneeded flag

* add warning

* add yarn bypass

* docstrings

* check for docker env

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: wolflu05 <76838159+wolflu05@users.noreply.github.com>
2023-07-20 10:12:08 +10:00
Matthias Mair
be59d1eb05
P UI: Rearrange CI (#5276)
* rearrange CI

* small name change
2023-07-19 21:50:26 +10:00
Oliver
cd3d3834be
Update translate task (#5283)
- Allow for skipping of building static files
- CI workflow does not have node / etc / installed
2023-07-19 10:43:40 +10:00
Matthias Mair
3e37469350
Platform UI - React integration (#5011)
* Add SPA views for react #2789

* split up frontend urls

* Add settings for frontend url loading

* add new UI scaffold

* remove tracking insert

* add platform app

* ensure static indexes work too

* add lingui

* add lingui config

* add mgmt tasks

* add base locales

* settings for frontend dev

* fix typo

* update deps

* add pre-commit

* add eslint

* add testing scaffold

* fix paths

* remove error - tests trip correctly

* merge workflow

* cleanup samples

* use name inline with other tests

* Add real worl frontend tests

* setup env

* tun migrations first

* optimize setup time

* setup demo dataset

* optimize run setup

* add test for class ui

* rename

* fix typo

* and another typo

* do install

* run migrations first

* fix name

* cleanup

* use other credentials

* use other credentials

* fix qc

* move envs to qc

* remove create_site

* reduce testing env

* fix test

* fix test call

* allaccess user

* add ui plattform check

* add better check

* remove unneeded env

* enable debug

* reduce wait time

* also build frontend on static

* add sort plugin

* fix order

* run pre-commit fixes

* add node min version

* Docker container (#129)

* Fix allocation check for completing build order (#5199)

- Allocation check only applies to untracked line items

* docker dev

Install required node packages to docker development image

* add import order settings

* cleanout built ui

* remove default arg from build

* remove eslint

* optimize svg

* add build step for plattform UI

* fix install command

* use alpine commands

* do not use cache when creating image

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2023-07-18 22:45:49 +10:00
Oliver
9cf629ccc5
Add migration check for 0.12.0 database (#5174) 2023-07-05 10:07:48 +10:00
Matthias Mair
73e0d03abf
Merge workflows (#5103)
* merge workflows
from https://github.com/inventree/InvenTree/pull/5087

* syntax fix
2023-06-26 09:43:57 +10:00
Oliver
3b4e20b54a
Unit Test Improvements (#5087)
* Disable migration testing

- Compare how long the unit tests take

* Change file

- To get unit tests to run

* Fix format

* Consolidate tasks.py

- Remove coverage task
- Add --coverage flag to test task

* Fix typo

* Run migration unit tests if migration files are updated

* Fix

* Touch migration file

- Should cause migration unit tests to be run

* Force migration checks for docker build

* Prevent default report creation in unit tests

- Should save some time

* Add simple profiling for plugin loading

- Display time taken to load each plugin

* Fix to invoke test

* Disable get_git_log (for testing)

* Disable get_git_path in CI

- Might remove this entirely?
- For now, bypass for unit testing

* Add debug for unit registry

- Display time taken to load registry

* Don't full-reload unit registry

* Adjust migration test workflow

- env var updates
- change paths-filter output

* Fix for migration_test.yaml

- Actually need to set the output

* env fix

* db name

* Prevent sleep if in test mode

* Reduce sleep time on wait_for_db
2023-06-23 17:25:59 +10:00
Oliver
66ec82d4d1
Add migration test workflow (#4973)
* Add migration test workflow

* Adds dummy migration

- For testing only
- Will be removed

* Improvements to workflow

* Update workflow

* Use manual git step

* Don't install twice

* Let's try again

* Does v3 work?

* Try https repo

* Fix repo address

* Once more with feeling

* Fix location of test database

* Revert change to wrong file

* Fix DB location

* Hard-code database path

* debugging

* More updates grrr

* Adjust permissions on database file

* Manual git operation

* Updates for migration test workflow

* Fix database names

* Remove dummy migration file

* Fix filters

* Fix path filter

* Explicit pathing

* Fix formatting error

* Another formatting error
2023-06-20 22:37:30 +10:00
Matthias Mair
f3a13fc625
Add SBOM to container (#5017)
* Add sbom to docker

* Enable manual release

* remove dispatch
2023-06-11 23:37:03 +10:00
Matthias Mair
d710efb64b
remove concurrency checks (#5002)
Fixes https://github.com/inventree/InvenTree/issues/4999
2023-06-09 10:30:03 +10:00
Matthias Mair
005c8341bf
Improve devdocs (#4813)
* move devcontainer docs

* rename bare metal pages

* fix backlinks

* Add getting started for devs

* add mermaid

* include contrib in docs

* use another plugin

* include everything

* update doc checks

* fix install command

* remove mermaid

* remove inclusion tag

* remove empty list item

* readd include-markdown

* use non-conflicting syntax for include

* fix table rendering in mkdocs

* make controbuting embedable

* re-add mermaid

* remove empty section

* resturcture

* remove mermaid again
2023-06-09 10:16:30 +10:00
dependabot[bot]
2ed7eefa27
Bump cryptography from 40.0.1 to 41.0.0 (#4955)
* Bump cryptography from 40.0.1 to 41.0.0

Bumps [cryptography](https://github.com/pyca/cryptography) from 40.0.1 to 41.0.0.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/40.0.1...41.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* bump everything

* do not build for linux/arm/v7
see https://github.com/inventree/InvenTree/pull/4955#issuecomment-1575909025

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2023-06-05 19:27:27 +10:00
Matthias Mair
21ed4b2081
Fix common spelling mistakes (#4956)
* add codespell

* first fixes

* doc fixes

* fix docstrings and comments

* functional changes

* docstrings again

* and docs again

* rename args

* add ignore

* use pre-commit for filtering instead

* ups

* fix typo in filter
2023-06-04 00:04:52 +10:00
Oliver
637b195a68
Add name to backport workflow (#4914) 2023-05-28 20:26:39 +10:00
Oliver
60f79a0a23
Add workflow for backporting PRs (#4912)
* Add workflow for backporting PRs

- Time saving for backporting bug fixes to stable branches
- Apply to PRs before closing

* Cleanup .json file
2023-05-28 18:55:06 +10:00
Oliver
e2505433a2
Docker build fix (#4811)
* Attempt to fix crypto build on raspbian

* Run CI if requirements files change
2023-05-15 08:27:26 +10:00
Matthias Mair
10c3d101e8
Replace mklint with djlint (#4746)
* remove markuplint

* remove dedicated html step - will be done by pre-commit

* add djlint for django template linting

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* Fix H014: Found extra blank lines

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* small fixes

* Fix T001: Variables should be wrapped in a single whitespace

* Fix T003: Endblock should have name

* small fixes

* fix form method

* add entry to contributing

* fix template changes

* another fix

* use current version
2023-05-02 20:03:52 +10:00
Matthias Mair
e5e1a09b45
CI cleanup (#4744)
* merge doc checks into main QC checks

* rename

* well both APIs are closed now so this would be useless

* make header more concise

* add check if server code changed - make run conditional

* reformat
2023-05-02 07:58:57 +10:00
Oliver
c5ba632463
Use coveralls github action (#4735) 2023-05-01 22:13:35 +10:00
Matthias Mair
3975a85742
Check if doc links are broken (#4686)
* add check for links

* fix style

* call silently

* add dep

* add path

* ignore readme as it contains necesarry broken links

* fix syntax

* check recursevly

* run in sync

* use linkcheckmd instaead

* use sync

* add requests

* revert fix to check if checks still work

* fix lookup

* fix old link

* run check verbose

* run async

* remove recurse

* introduce error for test

* fix link
2023-04-27 07:24:26 +10:00
Oliver
2ffd2354eb
Documentation integration (#4653)
* Add documentation under docs/ directory

* Add CI workflow for mkdocs configuration checking

* Add documentation issue template

* update pip-tools?

* Update .gitignore files

* Fix .gitignore rules

* Improve release notes page

* remove references to old repo
2023-04-22 22:40:29 +10:00
Matthias Mair
ab7b03ac59
Add GHCR.io as publishing target (#4561)
* update deps

* Add GHCR.io as publishing target
Fixes #4560

* add permissions

* Revert "update deps"

This reverts commit cb2f612bb3.
2023-04-05 22:01:05 +10:00
Oliver
f070c64534
Adds concurrency config for docker CI workflow (#4160) 2023-01-06 10:40:50 +11:00
Oliver
8a095f00cf
Disable cosign step in docker workflow (#4145)
- Is not working, just throws errors
- Also disable dependency workflow (is not working)
2023-01-04 11:21:25 +11:00
Oliver
95dc78a61f
[Testing] Fix docker build (#4109)
* Test fix for ongoing CI issues

(cherry picked from commit 3bf5492cb6)

* Run docker test on PR (temporarily)

* Add token to unit testing env

* Add github token to env file

* Fix for github token

* Ignore blank tokens

* Don't run on PR
2022-12-26 23:27:12 +11:00
Oliver
4034349043
Use github token for version check (#4092)
* Use github token for version check

- Should prevent 403 errors

* Use github token when running version update in unit test
2022-12-21 23:00:23 +11:00
Oliver
0f55cbf7f5
Import setuptools in manage.py (#4061)
* Import setuptools in manage.py

Ref: https://github.com/pypa/setuptools/issues/3706

* Import all the things

* Show setuptools version

* Update setuptools to latest verseion

* Force upgrade of setuptools version

* Remove debug

* Prevent docker builds on PR

* Remove setuptools imports
2022-12-16 07:42:07 +11:00
Oliver
bfeffd0cc7
Docker fix final 2 (#4049)
* Append correct python path if not present (only during testing)

* Add a bunch more debug info

* Display docker compose version

* More unit test fixes

* More debug info

* Ensure correct python path is included for docker build (only for testing)

* Remove debug statements

* Don't run docker workflow on PR
2022-12-14 22:28:46 +11:00
Oliver
2f7be70287
Append correct python path if not present (only during testing) (#4048)
* Append correct python path if not present (only during testing)

* Add a bunch more debug info
2022-12-12 19:17:16 +11:00
Oliver
c4f0fa4d3a
Debug for docker workflow (#4021)
* Debug for docker workflow

* Show docker image hash

* More debug output

* Debug system path

* Disable pty for invoke test

* Disable pty as part of invoke test

* remove debug statements

* Disable docker workflow on pull request
2022-12-09 00:15:26 +11:00
Oliver
4ad88c7822
Test for docker workflow (#4014)
* Test for docker workflow

* Ensure yaml is installed in the local env

* Install the right package

* Debug yaml path

* Check data directory first

* Let them run

* More debug info

* Try reverting a recent change

* Disable test

* Check envvar directory

* Remove debug prints

* Re-enable unit test

* Use os.getenv

* Prevent docker workflow from running on pull requests

* Re-add InvenTree.helpers import
2022-12-05 13:10:14 +11:00
Oliver
1b168ba904
Fix for stable release (#4006)
- Was disabled, as it was bundled in with the social media workflows
- Splits out into separate workflow
2022-11-30 10:50:31 +11:00
Oliver
ff400106d7
Fix for docker workflow (#3989)
* Update docker workflow

* typo fix

* Run tests differently in docker

* Settings tweak

* revert settings change

* Don't build docker image on PR
2022-11-22 23:28:16 +11:00
Oliver
0fd1390fe0
Workflow fix (#3830)
* Specify minimum python version for docker build workflow

(cherry picked from commit 18c55b30b81aef66c131a960586b52d655a621f9)

* Specify python version for translation checker

(cherry picked from commit 14360507f5c9d77ed8321755aab25a79fbcf10f9)

* Disable social media workflow

(has never worked, anyway)

(cherry picked from commit 56fbcbeae25b165978d149aa484ae7335f8f67a4)
2022-10-22 12:45:50 +11:00
Matthias Mair
c0bcee870e
Bump actions to node 16 / current releases (#3799)
* bump actions to node 16 / current releases

* fix merge
2022-10-17 13:46:12 +11:00
Matthias Mair
182bc29053
Add db an media backups (#3783)
* [FR] Add backup into inventrees lifecycle
Fixes #3778

* Add env to testing enviros

* block backup from running app commands

* Add more commands

* fix postgres version

* Update used env

* add daily task to run backups

* add installer changes
2022-10-17 00:09:31 +11:00
Matthias Mair
a1c91cfd8e
remove broken action (#3742) 2022-10-04 16:29:15 +10:00
Oliver
c8e8991cf5
Fix for stable branch push (#3619)
* Fix for stable branch push

* Ensure we don't update stable to an older release
2022-08-30 14:27:55 +10:00
Matthias Mair
0a57f9d459
Fix: Broken subfolder tests in postgres/docker CI in master (#3559)
* disable failing tests for sanity check

* run postgrest too

* only run problematic tests

* make paths relative

* refactor to reduce duplicate code

* remove testing restrictions again
2022-08-17 09:10:56 +10:00
Matthias Mair
00dbf00eb9
[FR] Tie github actions to specific commit hashes (#3532)
* [FR] Tie github actions to specific commit hashes
Fixes #3530

* udpate action versions
2022-08-15 08:20:03 +10:00
Matthias Mair
12a321ed4f
Depenency updates (#3472)
* update requirements

* automate everything
2022-08-06 09:26:27 +10:00
Oliver
7cabb78964
Docker compose relative path (#3410)
* Update development docker-compose file

- Remove external volume definition
- v2 does not allow relative path spec here
- Simplification is only required for dev version

* Remove old debug messages

* Update docker build CI step

- Check that required directories / files have been created in the correct location(s)

* Add check for pgdb directory

* Run partial docker check on pull_request

* Disable workflow running on pull requests
2022-07-27 07:50:54 +10:00
Oliver
779646771d
Use different twitter action (#3387) 2022-07-22 13:44:40 +10:00
Oliver
aca58dedc0
Fix for docker signing (#3363)
- Add required "images" attribute
- Ref: https://github.com/docker/metadata-action#images-input
2022-07-20 18:32:18 +10:00
Matthias Mair
dbbdaf39c7
[FR] Sign artifacts with sigstore (#3347)
Fixes #3077
2022-07-20 16:20:58 +10:00
Matthias Mair
6133c745d7
[FR] Automated releases (#3316)
* [FR] Automated releases
automated messages on the socials
Fixes #3078

* Add more details to Reddit

* Fix twitter text

* fix syntax

* Update release.yml

Add hashtags to twitter post

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2022-07-10 22:23:10 +10:00
Oliver
a0de446e5e
Docker: Use existing task definition (#3279) 2022-07-01 21:03:25 +10:00
Oliver
4403c9cfe4
Fixes for broken CI builds (#3276)
* Install dev requirements when running unit tests

* Disable mysql and postgresql checks for pull requests

* Install required dev packages when running tests on docker build
2022-07-01 12:36:20 +10:00
Matthias Mair
cf70e4220f
Update requirements (#3228)
* Remove stat context variables

* Revert "Remove stat context variables"

This reverts commit 0989c308d0.

* 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>
2022-06-28 22:12:00 +10:00
Oliver
f223ea224d
Docker requirements update (#3266)
* Pin mariadb package <= 1.1.0

- Recent update to 1.1.2 requires newer version of mariadb connector

* Change <= to <
2022-06-28 13:47:10 +10:00
Oliver
44b42050aa
Fix translation issue with javascript (#3246)
* Adds a custom translation node class to strip dirty characters from translated strings

* Update javascript files to use new template tag

* Override behaviour of {% load i18n %}

- No longer requires custom tag loading
- All templates now use escaped translation values
- Requires re-ordering of app loading
- Revert js_i18n to simply i18n

* CI step now lints JS files compiled in each locale

* Checking that the CI step fails

* Revert "Checking that the CI step fails"

This reverts commit ba2be0470d.
2022-06-25 10:50:26 +10:00
Oliver
5870b21a91
Simplify version_check script (#3152)
* Simplify version_check script

- Allow 'x.x.x' or 'x.x.x dev' on master branch (because we need to be able to tag releases from master)
- Remove duplicate regex checks
- Fix docstrings

* Run version check on all branches

- Will ensure we cannot merge in duplicate tags

* Add requests package

* Add requests package
2022-06-07 08:57:51 +10:00
Matthias Mair
0c97a50e47
Docstring checks in QC checks (#3089)
* Add pre-commit to the stack

* exclude static

* Add locales to excludes

* fix style errors

* rename pipeline steps

* also wait on precommit

* make template matching simpler

* Use the same code for python setup everywhere

* use step and cache for python setup

* move regular settings up into general envs

* just use full update

* Use invoke instead of static references

* make setup actions more similar

* use python3

* refactor names to be similar

* fix runner version

* fix references

* remove incidential change

* use matrix for os

* Github can't do this right now

* ignore docstyle errors

* Add seperate docstring test

* update flake call

* do not fail on docstring

* refactor setup into workflow

* update reference

* switch to action

* resturcture

* add bash statements

* remove os from cache

* update input checks

* make code cleaner

* fix boolean

* no relative paths

* install wheel by python

* switch to install

* revert back to simple wheel

* refactor import export tests

* move setup keys back to not disturbe tests

* remove docstyle till that is fixed

* update references

* continue on error

* add docstring test

* use relativ action references

* Change step / job docstrings

* update to merge

* reformat comments 1

* fix docstrings 2

* fix docstrings 3

* fix docstrings 4

* fix docstrings 5

* fix docstrings 6

* fix docstrings 7

* fix docstrings 8

* fix docstirns 9

* fix docstrings 10

* docstring adjustments

* update the remaining docstrings

* small docstring changes

* fix function name

* update support files for docstrings

* Add missing args to docstrings

* Remove outdated function

* Add docstrings for the 'build' app

* Make API code cleaner

* add more docstrings for plugin app

* Remove dead code for plugin settings
No idea what that was even intended for

* ignore __init__ files for docstrings

* More docstrings

* Update docstrings for the 'part' directory

* Fixes for related_part functionality

* Fix removed stuff from merge 99676ee

* make more consistent

* Show statistics for docstrings

* add more docstrings

* move specific register statements to make them clearer to understant

* More docstrings for common

* and more docstrings

* and more

* simpler call

* docstrings for notifications

* docstrings for common/tests

* Add docs for common/models

* Revert "move specific register statements to make them clearer to understant"

This reverts commit ca96654622.

* use typing here

* Revert "Make API code cleaner"

This reverts commit 24fb68bd3e.

* docstring updates for the 'users' app

* Add generic Meta info to simple Meta classes

* remove unneeded unique_together statements

* More simple metas

* Remove unnecessary format specifier

* Remove extra json format specifiers

* Add docstrings for the 'plugin' app

* Docstrings for the 'label' app

* Add missing docstrings for the 'report' app

* Fix build test regression

* Fix top-level files

* docstrings for InvenTree/InvenTree

* reduce unneeded code

* add docstrings

* and more docstrings

* more docstrings

* more docstrings for stock

* more docstrings

* docstrings for order/views

* Docstrings for various files in the 'order' app

* Docstrings for order/test_api.py

* Docstrings for order/serializers.py

* Docstrings for order/admin.py

* More docstrings for the order app

* Add docstrings for the 'company' app

* Add unit tests for rebuilding the reference fields

* Prune out some more dead code

* remove more dead code

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2022-06-02 01:37:39 +10:00
Oliver
8c9f676ffb
Fix formatting of 'build-args' parameter for docker build (#3105)
* Fix formatting of 'build-args' parameter for docker build

* Remove quotes
2022-05-31 14:26:35 +10:00
Oliver
ccefefdc7f
Version checker (#3102)
* Updates for docker version check script:

- Do not run on a push to stable
- Check existing versions via GitHub API
- Add stable docker image tag also

* Fix regex pattern

* Check for null regex result

* Push to stable on tagged release
2022-05-31 09:50:38 +10:00
Oliver
deacf207ff
Docker Build Fixes (#3093)
* Docker: Require libffi-dev

* set push to true

* debug

* Check GITHUB_BASE_REF also
2022-05-29 13:47:29 +10:00
Oliver
b9fd263899
Docker improvements (#3042)
* Simplified dockerfile

- Changed from alpine to python:slim
- Removed some database libs (because we *connect* to a db, not host it)

* - Add gettext as required package
- Only create inventree user as part of production build (leave admin access for dev build)

* Tweaks for tasks.py

* Fix user permissions (drop to inventree user)

* Drop to the 'inventree' user level as part of init.sh

- As we have mounted volumes at 'run time' we need to ensure that the inventree user has correct permissions!
- Ref: https://stackoverflow.com/questions/39397548/how-to-give-non-root-user-in-docker-container-access-to-a-volume-mounted-on-the

* Adjust user setup

- Only drop to non-root user as part of "production" build
- Mounted external volumes make it tricky when in the dev build
- Might want to revisit this later on

* More dockerfile changes

- reduce required system packages
-

* Add new docker github workflow

* Print some more debug

* GITHUB_BASE_REF

* Add gnupg to base requirements

* Improve debug output during testing

* Refactoring updates for label printing API

- Update weasyprint version to 55.0
- Generate labels as pdf files
- Provide filename to label printing plugin
- Additional unit testing
- Improve extraction of some hidden debug data during TESTING
- Fix a spelling mistake (notifaction -> notification)

* Working on github action

* More testing

* Add requirement for pdf2image

* Fix label printing plugin and update unit testing

* Add required packages for CI

* Move docker files to the top level directory

- This allows us to build the production image directly from soure
- Don't need to re-download the source code from github
- Note: The docker install guide will need to be updated!

* Fix for docker ci file

* Print GIT SHA

* Bake git information into the production image

* Add some exta docstrings to dockerfile

* Simplify version check script

* Extract git commit info

* Extract docker tag from check_version.py

* Newline

* More work on the docker workflow

* Dockerfile fixes

- Directory / path issues

* Dockerfile fixes

- Directory / path issues

* Ignore certain steps on a pull request

* Add poppler-utils to CI

* Consolidate version check into existing CI file

* Don't run docker workflow on pull request

* Pass docker image tag through to the build

Also check .j2k files

* Add supervisord.conf example file back in

* Remove --no-cache-dir option from pip install
2022-05-29 09:40:37 +10:00
Matthias Mair
4d8836378b
CI updates (#3087)
* Add pre-commit to the stack

* exclude static

* Add locales to excludes

* fix style errors

* rename pipeline steps

* also wait on precommit

* make template matching simpler

* Use the same code for python setup everywhere

* use step and cache for python setup

* move regular settings up into general envs

* just use full update

* Use invoke instead of static references

* make setup actions more similar

* use python3

* refactor names to be similar

* fix runner version

* fix references

* remove incidential change

* use matrix for os

* Github can't do this right now

* ignore docstyle errors

* Add seperate docstring test

* update flake call

* do not fail on docstring

* refactor setup into workflow

* update reference

* switch to action

* resturcture

* add bash statements

* remove os from cache

* update input checks

* make code cleaner

* fix boolean

* no relative paths

* install wheel by python

* switch to install

* revert back to simple wheel

* refactor import export tests

* move setup keys back to not disturbe tests

* remove docstyle till that is fixed

* update references

* continue on error

* use relativ action references

* Change step / job docstrings
2022-05-28 10:38:12 +10:00
Matthias Mair
93b6934127 fix trailing 2022-05-20 13:20:55 +02:00
Matthias Mair
e1abdddc4a
Merge branch 'inventree:master' into not-working-tests 2022-05-20 00:28:35 +02:00
Oliver
af88f6ec97 python CI: wait for server before continuing 2022-05-19 11:55:53 +10:00
Matthias
b2f5c60877
update pip before running - reduce warnings 2022-05-19 01:46:04 +02:00
Matthias
38f8e9c9ab
remove duplicate install 2022-05-19 01:13:47 +02:00
Matthias
4d4a164923
do full update 2022-05-19 01:02:24 +02:00
Matthias
16dad60ea5
collect static right before starting 2022-05-18 23:31:18 +02:00
Oliver
2fde482eab Simplify steps 2022-05-18 15:39:58 +10:00
Oliver
3e05c5fde1 Bring docker containers down 2022-05-18 15:12:19 +10:00
Oliver
ea3133be1d Combine docker-build and docker-test CI steps
- We are building anyway, may as well test
2022-05-18 15:11:37 +10:00
Oliver
f53c8865ad Only run docker build on push 2022-05-18 14:14:40 +10:00
Oliver Walters
dc2351748c Merge remote-tracking branch 'inventree/master' into webp-support 2022-05-17 18:48:19 +10:00
Matthias Mair
65d0d7906c add gettext 2022-05-16 19:10:48 +02:00
Matthias Mair
5f2c21aa62 run full install 2022-05-16 18:50:16 +02:00
Oliver
5bc748316d
Merge pull request #2995 from matmair/fix-actions
Small action fixes
2022-05-16 00:52:01 +10:00
Matthias Mair
e83f9ead0a
update tags to new names 2022-05-15 15:58:20 +02:00
Matthias Mair
55b909a1de
fix new lines 2022-05-15 15:56:08 +02:00
Matthias Mair
76266ab98a
use python 3.9 here too 2022-05-15 15:52:55 +02:00
Matthias Mair
8366c6a2a3
bump python version 2022-05-15 15:49:41 +02:00
Oliver Walters
47269a88d2 Ensure unit tests are run within a docker context as part of CI builds 2022-05-15 23:37:01 +10:00
Oliver
21d2b54afe Fix CI step 2022-05-12 11:00:43 +10:00
Oliver
aa9ee15fb4 Fix CI pipeline for python checks
- Recently updated the python binding test framework
2022-05-12 10:52:53 +10:00
Oliver
a6815c8334 if != on 2022-05-11 14:16:39 +10:00
Oliver
37ce9f351d postgresql and mysql checks only run on push
- sqlite and coverage still runs on pull_request
- should speed up CI checks / reduce redundant CI server load
2022-05-11 14:15:44 +10:00
Oliver Walters
36da363188 Force push translation files 2022-05-02 09:37:33 +10:00
Oliver Walters
8635cb8267 Fix CI 2022-05-01 23:21:49 +10:00
Oliver Walters
9e469a949f Push from latest master to l10 branch 2022-05-01 22:43:25 +10:00
Matthias Mair
b1019abb45
adding permissions to hook
see https://github.com/inventree/InvenTree/pull/2895#issuecomment-1112733654
2022-04-30 20:01:30 +02:00
Oliver
91560dcc6d Fix build-args in workflows
(cherry picked from commit a4aa4201f02b613ab23fdd3fe45db2c129a2baca)
2022-02-21 13:27:26 +11:00
Oliver
e2bfa17522 Enable plugin support for github ci pipelines 2022-01-11 14:15:51 +11:00
Matthias Mair
8799985f75
Merge branch 'inventree:master' into stale 2022-01-07 00:08:28 +01:00
Matthias Mair
a02ae8c20d
add welcome messages 2022-01-05 23:41:04 +01:00
Matthias Mair
9b1e944509
ignore everything that got a milestone
this helps keeping false positives lower
2022-01-04 00:04:05 +01:00
Matthias Mair
993b368d3d
new stale check 2022-01-03 23:59:16 +01:00
Oliver
ecb9643cc1 Use sqlite config for docker build test 2021-12-21 16:14:04 +11:00
Oliver
4805540b4c try simplifying 2021-12-14 22:52:14 +11:00
Oliver
070d01b2f4 Try with newer python 2021-12-14 22:48:44 +11:00
Oliver
a9d09c7d29 Fix mysql installs for github actions 2021-12-14 19:56:34 +11:00
Oliver
967584b25a Specify mysql version 2021-12-14 17:35:36 +11:00
Oliver
8d4f8204ca call apt-get update in workflow scripts 2021-12-13 23:48:30 +11:00