Dart CI #1224
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: Dart CI | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
analyze-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Install dependencies | |
run: dart pub get | |
- name: Verify formatting | |
run: dart format --output=none --set-exit-if-changed . | |
- name: Analyze project source | |
run: dart analyze | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
sdk-version: [ stable, beta, dev, 2.19.0 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk-version }} | |
- name: Install dependencies | |
run: dart pub get | |
- name: Run tests | |
run: dart test | |
publish-dry-run: | |
needs: [analyze-format, test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Install dependencies | |
run: dart pub get | |
- name: Publish dry-run | |
run: dart pub publish --dry-run |