mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Split CI steps into different files
This commit is contained in:
parent
2910c8356a
commit
8cda3cfa8d
39
.github/workflows/android.yaml
vendored
Normal file
39
.github/workflows/android.yaml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Build Android version of the app
|
||||||
|
|
||||||
|
name: Android
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: '12.x'
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
flutter-version: '2.10.3'
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
gradle-version: 6.1.1
|
||||||
|
- name: Build for Android
|
||||||
|
run: |
|
||||||
|
flutter pub get
|
||||||
|
cp lib/dummy_dsn.dart lib/dsn.dart
|
||||||
|
flutter build apk --debug
|
38
.github/workflows/ios.yaml
vendored
Normal file
38
.github/workflows/ios.yaml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Build iOS version of the app
|
||||||
|
|
||||||
|
name: iOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: '12.x'
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
flutter-version: '2.10.3'
|
||||||
|
- name: Build for iOS
|
||||||
|
run: |
|
||||||
|
pod init
|
||||||
|
flutter pub get
|
||||||
|
cp lib/dummy_dsn.dart lib/dsn.dart
|
||||||
|
pod repo update
|
||||||
|
pod install
|
||||||
|
flutter build ios --release --no-codesign
|
37
.github/workflows/lint.yaml
vendored
Normal file
37
.github/workflows/lint.yaml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Run flutter linting checks
|
||||||
|
|
||||||
|
name: lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: '12.x'
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
flutter-version: '2.10.3'
|
||||||
|
- run: flutter pub get
|
||||||
|
- run: cp lib/dummy_dsn.dart lib/dsn.dart
|
||||||
|
- run: flutter analyze
|
||||||
|
- run: flutter test --coverage
|
87
.github/workflows/test.yaml
vendored
87
.github/workflows/test.yaml
vendored
@ -1,87 +0,0 @@
|
|||||||
# Run flutter linting checks
|
|
||||||
|
|
||||||
name: test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: '12.x'
|
|
||||||
- name: Setup Flutter
|
|
||||||
uses: subosito/flutter-action@v1
|
|
||||||
with:
|
|
||||||
flutter-version: '2.10.3'
|
|
||||||
- run: flutter pub get
|
|
||||||
- run: cp lib/dummy_dsn.dart lib/dsn.dart
|
|
||||||
- run: flutter analyze
|
|
||||||
- run: flutter test --coverage
|
|
||||||
|
|
||||||
android:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: '12.x'
|
|
||||||
- name: Setup Flutter
|
|
||||||
uses: subosito/flutter-action@v1
|
|
||||||
with:
|
|
||||||
flutter-version: '2.10.3'
|
|
||||||
- name: Setup Gradle
|
|
||||||
uses: gradle/gradle-build-action@v2
|
|
||||||
with:
|
|
||||||
gradle-version: 6.1.1
|
|
||||||
- name: Build for Android
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
cp lib/dummy_dsn.dart lib/dsn.dart
|
|
||||||
flutter build apk --debug
|
|
||||||
|
|
||||||
ios:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: '12.x'
|
|
||||||
- name: Setup Flutter
|
|
||||||
uses: subosito/flutter-action@v1
|
|
||||||
with:
|
|
||||||
flutter-version: '2.10.3'
|
|
||||||
- name: Build for iOS
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
cp lib/dummy_dsn.dart lib/dsn.dart
|
|
||||||
pod repo update
|
|
||||||
pod install
|
|
||||||
flutter build ios --release --no-codesign
|
|
Loading…
x
Reference in New Issue
Block a user