Updated pipelines
This commit is contained in:
40
.github/workflows/pull_request.yml
vendored
Normal file
40
.github/workflows/pull_request.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Pull_Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set Up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: '3.32.1'
|
||||
channel: 'stable'
|
||||
|
||||
- name: Check Formatting
|
||||
run: flutter analyze
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
needs: [lint, format]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set Up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: '3.32.1'
|
||||
channel: 'stable'
|
||||
|
||||
- name: Get dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Run Tests
|
||||
run: flutter test
|
||||
@@ -1,15 +1,13 @@
|
||||
name: Flutter
|
||||
name: Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "develop"
|
||||
- "main"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
generate_licenses:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -69,7 +67,7 @@ jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
if: ${{ failure() && needs.lint.result == 'failure' && github.event_name == 'push' && github.ref == 'refs/heads/develop'}}
|
||||
if: ${{ failure() && needs.lint.result == 'failure'}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user