feat: Workflow for publishing #1
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: ✅ Check and test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-check-and-test | |
cancel-in-progress: true | |
jobs: | |
check-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- 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 --fatal-infos | |
- name: Run tests | |
run: dart test |