focus-flow/.github/workflows/ci.yml

56 lines
1.3 KiB
YAML

# Runs analyzer, tests, coverage, docs, and tagged desktop packaging.
name: CI
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- run: dart pub get
- run: dart analyze
- run: dart run scripts/test.dart
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-${{ matrix.os }}
path: |
coverage/
doc/api/
package:
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
- os: windows-latest
platform: windows
- os: macos-latest
platform: macos
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
- run: dart pub get
- run: dart run scripts/build.dart --platform ${{ matrix.platform }} --output build/releases
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.platform }}
path: build/releases/