feat: Init command #1570
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: all_packages | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
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: invertase/github-action-dart-analyzer@v1 | |
with: | |
fatal-infos: true | |
fatal-warnings: true | |
# This job ensures `melos` compiles and runs fine on the | |
# minimum Dart SDK version that it supports. | |
dart_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: 3.0.0 # Update when min sdk supported version of `melos` package changes. | |
- name: Run Melos | |
run: ./.github/workflows/scripts/install-tools.sh | |
# This job ensures `melos` can be installed alongside Flutter dependencies on | |
# the stable channel. | |
melos_flutter_deps_check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Get dependencies | |
working-directory: packages/melos_flutter_deps_check | |
run: flutter pub get | |
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_linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install Tools | |
run: ./.github/workflows/scripts/install-tools.sh | |
- name: Run Tests | |
run: melos test --no-select | |
test_macos: | |
runs-on: macos-latest | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install Tools | |
run: ./.github/workflows/scripts/install-tools.sh | |
- name: Run Tests | |
run: melos test --no-select | |
test_windows: | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install Tools | |
run: .\.github\workflows\scripts\install-tools.bat | |
- name: Run Tests | |
# TODO: Figure out why invoking Melos via PowerShell doesn't work properly. | |
# When using PowerShell, the exit code is not propagated correctly. | |
# Even running `CMD /C melos ...` from PowerShell does not work. | |
shell: cmd | |
run: melos test --no-select |