Updated workflow for licenses
This commit is contained in:
44
.github/workflows/flutter.yml
vendored
44
.github/workflows/flutter.yml
vendored
@@ -8,22 +8,43 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
generate_licenses:
|
||||||
runs-on: macos-latest
|
if: github.event_name == 'push' && github.ref == 'refs/heads/develop
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Flutter
|
||||||
|
uses: subosito/flutter-action@v1.5.3
|
||||||
|
with:
|
||||||
|
flutter-version: '3.32.1'
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: Generate oss_licenses.dart
|
||||||
|
run: flutter pub run flutter_oss_licenses:generate.dart -o lib/presentation/views/about/licenses/oss_licenses.dart
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set Up Flutter
|
- name: Set Up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.29.2'
|
flutter-version: '3.32.1'
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
- name: Check Formatting
|
- name: Check Formatting
|
||||||
run: flutter analyze
|
run: flutter analyze
|
||||||
|
|
||||||
format:
|
format:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint
|
needs: lint
|
||||||
if: ${{ failure() && needs.lint.result == 'failure' && github.event_name == 'push' && github.ref == 'refs/heads/develop'}}
|
if: ${{ failure() && needs.lint.result == 'failure' && github.event_name == 'push' && github.ref == 'refs/heads/develop'}}
|
||||||
steps:
|
steps:
|
||||||
@@ -32,7 +53,7 @@ jobs:
|
|||||||
- name: Set Up Flutter
|
- name: Set Up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.29.2'
|
flutter-version: '3.32.1'
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
- name: Get & upgrade dependencies
|
- name: Get & upgrade dependencies
|
||||||
@@ -64,7 +85,7 @@ jobs:
|
|||||||
git push
|
git push
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
needs: [lint, format]
|
needs: [lint, format]
|
||||||
|
|
||||||
@@ -74,15 +95,18 @@ jobs:
|
|||||||
- name: Set Up Flutter
|
- name: Set Up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.29.2'
|
flutter-version: '3.32.1'
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: flutter test
|
run: flutter test
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
if: false # skips job
|
if: false # skips job
|
||||||
needs: [lint, format, test]
|
needs: [lint, format, test]
|
||||||
|
|
||||||
@@ -92,10 +116,10 @@ jobs:
|
|||||||
- name: Set Up Flutter
|
- name: Set Up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.29.2'
|
flutter-version: '3.32.1'
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Get dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Analyze project source
|
- name: Analyze project source
|
||||||
|
|||||||
Reference in New Issue
Block a user