ci: merge testing workflow into build and release
This commit is contained in:
parent
7609e2b38d
commit
9dd0902dc7
25
.github/workflows/build-and-release.yml
vendored
25
.github/workflows/build-and-release.yml
vendored
@ -4,13 +4,12 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "release/**"
|
||||
tags:
|
||||
- "v*"
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "lib/**"
|
||||
- "assets/**"
|
||||
@ -39,6 +38,7 @@ env:
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.base_ref == 'main') }}
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- verify
|
||||
@ -85,11 +85,28 @@ jobs:
|
||||
shell: bash
|
||||
run: bash ./scripts/ci/setup_platform_deps.sh linux
|
||||
|
||||
- name: Run analysis and tests
|
||||
- name: Run Flutter verification suite
|
||||
shell: bash
|
||||
run: bash ./scripts/ci/run_code_analysis.sh
|
||||
run: bash ./scripts/ci/run_flutter_ci_suite.sh
|
||||
|
||||
patrol:
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
||||
|
||||
- name: Set up Flutter SDK
|
||||
uses: ./.github/actions/setup-flutter-sdk
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
||||
- name: Run Patrol suite
|
||||
shell: bash
|
||||
run: bash ./scripts/ci/run_patrol_suite.sh
|
||||
|
||||
build:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.base_ref == 'main') }}
|
||||
name: Build ${{ matrix.platform }} ${{ matrix.package }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
33
.github/workflows/testing.yml
vendored
33
.github/workflows/testing.yml
vendored
@ -1,33 +0,0 @@
|
||||
name: testing
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'release/**'
|
||||
|
||||
jobs:
|
||||
flutter:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
- run: flutter pub get
|
||||
- run: flutter test
|
||||
- run: flutter test test/golden
|
||||
- run: flutter test integration_test
|
||||
|
||||
patrol:
|
||||
if: startsWith(github.ref, 'refs/heads/release/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
- run: flutter pub get
|
||||
- run: dart pub global activate patrol_cli
|
||||
- run: patrol test
|
||||
8
scripts/ci/run_flutter_ci_suite.sh
Normal file
8
scripts/ci/run_flutter_ci_suite.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
flutter pub get
|
||||
flutter analyze
|
||||
flutter test
|
||||
flutter test test/golden
|
||||
flutter test integration_test
|
||||
6
scripts/ci/run_patrol_suite.sh
Normal file
6
scripts/ci/run_patrol_suite.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
flutter pub get
|
||||
dart pub global activate patrol_cli
|
||||
patrol test
|
||||
Loading…
Reference in New Issue
Block a user