Merge pull request #91 from inventree/SchrodingersGat-patch-2 #388
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Build the package, make sure it compiles OK | |
| name: Build Package | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.11 | |
| - name: Install Python Dependencies | |
| run: | | |
| pip install --upgrade wheel setuptools twine build | |
| pip install ruff | |
| - name: Install Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: "20" | |
| - name: Build Package | |
| run: | | |
| python -m build | |
| pip install . | |
| - name: Generate plugin | |
| run: | | |
| create-inventree-plugin --default --output output | |
| - name: Check Plugin Structure | |
| run: | | |
| test -f ~/.config/inventree-plugin-creator/config.json | |
| cd output | |
| test -d MyCustomPlugin | |
| test -d MyCustomPlugin/my_custom_plugin | |
| test -f MyCustomPlugin/my_custom_plugin/__init__.py | |
| test -f MyCustomPlugin/my_custom_plugin/admin.py | |
| test -f MyCustomPlugin/my_custom_plugin/apps.py | |
| test -f MyCustomPlugin/my_custom_plugin/core.py | |
| test -f MyCustomPlugin/my_custom_plugin/models.py | |
| test -f MyCustomPlugin/my_custom_plugin/serializers.py | |
| test -f MyCustomPlugin/my_custom_plugin/views.py | |
| test -f MyCustomPlugin/README.md | |
| test -f MyCustomPlugin/.github/workflows/ci.yaml | |
| test -f MyCustomPlugin/.github/workflows/pypi.yaml | |
| test -f MyCustomPlugin/frontend/README.md | |
| test -f MyCustomPlugin/frontend/vite.config.ts | |
| test -f MyCustomPlugin/frontend/src/Panel.tsx | |
| test -f MyCustomPlugin/frontend/src/Settings.tsx | |
| test -f MyCustomPlugin/frontend/src/Dashboard.tsx | |
| test -f MyCustomPlugin/frontend/src/Spotlight.tsx | |
| - name: Build and Install Plugin | |
| run: | | |
| cd output/MyCustomPlugin | |
| ruff check . | |
| python -m build | |
| pip install . | |
| - name: Build Frontend Code | |
| run: | | |
| cd output/MyCustomPlugin/frontend | |
| npm install | |
| npm run translate | |
| npm run build | |
| test -f src/locales/de/messages.ts | |
| test -f src/locales/en/messages.ts | |
| - name: Check Compiled Output | |
| run: | | |
| cd output/MyCustomPlugin | |
| test -d my_custom_plugin/static | |
| test -d my_custom_plugin/static/assets | |
| test -f my_custom_plugin/static/Panel.js | |
| test -f my_custom_plugin/static/Dashboard.js | |
| test -f my_custom_plugin/static/.vite/manifest.json |