diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 2846d88..02e9386 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -1,19 +1,31 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Check source code quality on: pull_request: branches: ["main"] + paths: + - "**.dart" + - "pubspec.yaml" + - "analysis_options.yaml" + - ".github/workflows/**" + + push: + branches: ["main"] + paths: + - "**.dart" + - "pubspec.yaml" + - "analysis_options.yaml" + - ".github/workflows/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: lint: name: Check lints runs-on: ubuntu-latest - + timeout-minutes: 5 steps: - uses: actions/checkout@v6 - uses: subosito/flutter-action@v2 @@ -22,17 +34,16 @@ jobs: cache: true - run: flutter --version - # Get flutter dependencies. - name: Install dependencies run: flutter pub get - # Check for any formatting issues in the code. - name: Verify formatting run: dart format --set-exit-if-changed . analyze: name: Check code analysis runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v6 - uses: subosito/flutter-action@v2 @@ -41,10 +52,8 @@ jobs: cache: true - run: flutter --version - # Get flutter dependencies. - name: Install dependencies run: flutter pub get - # Statically analyze the Dart code for any errors. - name: Analyze project source run: flutter analyze . diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 07187ab..dc39a89 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -1,20 +1,30 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Unit tests on: pull_request: branches: ["main"] + paths: + - "**.dart" + - "pubspec.yaml" + - ".github/workflows/**" + push: branches: ["main"] + paths: + - "**.dart" + - "pubspec.yaml" + - ".github/workflows/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: unit_test: name: Run unit tests runs-on: ubuntu-latest + timeout-minutes: 5 + steps: - uses: actions/checkout@v6 - uses: subosito/flutter-action@v2 @@ -23,10 +33,8 @@ jobs: cache: true - run: flutter --version - # Get flutter dependencies. - name: Install dependencies run: flutter pub get - # Run the unit tests. - name: Run unit tests run: flutter test