Skip to content

Commit

Permalink
chore: refactor CI
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Jul 3, 2024
1 parent 07d579b commit 4ef2285
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,52 @@ on:
push:
branches:
- main
defaults:
run:
shell: bash
env:
PUB_ENVIRONMENT: bot.github
permissions: read-all

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Analyze
- uses: actions/checkout@v4
- name: Install Melos
run: dart pub global activate melos
- name: Bootstrap the project
run: melos bootstrap
- name: Check the formatting of one or more Dart files
run: melos format --output none --set-exit-if-changed
- name: Analyze the project's Dart code
run: melos analyze --fatal-infos
- name: Invertase Analyze
uses: invertase/github-action-dart-analyzer@v1
with:
fatal-infos: true
fatal-warnings: true
working-directory: ./packages

format:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Check formatting
run: melos format --output none --set-exit-if-changed

test:
name: "Test"
needs: analyze
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Check tests
run: melos run test
- uses: actions/checkout@v4
- name: Install Melos
run: dart pub global activate melos
- name: Bootstrap the project
run: melos bootstrap
- name: Run tests
run: melos test
env:
CI: true

0 comments on commit 4ef2285

Please sign in to comment.