2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-10-14 05:12:21 +00:00
Files
inventree-app/.github/workflows/ci.yaml
Oliver bdc5573311 Re-order barcode scanning priority (#693)
* Re-order barcode scanning priority

- Closes https://github.com/inventree/inventree-app/issues/692

* dart format

* Try with removed line

* Try without pythonscript

* just pub get

* try with fvm

* Remove fvm

* set working dir

* try just pub get

* Install python first

* Updates

* Use fvm

* Adjust CI
2025-09-28 13:34:22 +10:00

94 lines
2.7 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INVENTREE_SITE_URL: http://localhost:8000
INVENTREE_DB_ENGINE: django.db.backends.sqlite3
INVENTREE_DB_NAME: ../inventree_unit_test_db.sqlite3
INVENTREE_MEDIA_ROOT: ../test_inventree_media
INVENTREE_STATIC_ROOT: ../test_inventree_static
INVENTREE_BACKUP_DIR: ../test_inventree_backup
INVENTREE_ADMIN_USER: testuser
INVENTREE_ADMIN_PASSWORD: testpassword
INVENTREE_ADMIN_EMAIL: test@test.com
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Flutter and FVM
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: Collect Translation Files
run: |
cd lib/l10n
python collect_translations.py
- name: Static Analysis Tests
working-directory: .
run: |
python ./find_dart_files.py
dart pub global activate fvm
fvm install
fvm flutter pub get
fvm flutter analyze
dart format --output=none --set-exit-if-changed .
- name: Start InvenTree Server
run: |
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel g++
pip3 install invoke
git clone --depth 1 https://github.com/inventree/inventree ./inventree_server
cd inventree_server
invoke install
invoke migrate
invoke dev.import-fixtures
invoke dev.server -a 127.0.0.1:8000 &
invoke wait
sleep 30
- name: Unit Tests
run: |
fvm flutter test --coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}