2023-10-26 22:23:26 +08:00
|
|
|
# This workflow will install Dart SDK, run format, analyze and build with Dart
|
2023-10-25 23:15:53 +08:00
|
|
|
|
|
|
|
name: Dart
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
paths: ["codes/dart/**/*.dart"]
|
|
|
|
pull_request:
|
|
|
|
branches: ["main"]
|
|
|
|
paths: ["codes/dart/**/*.dart"]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Dart ${{ matrix.dart-sdk }} on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2023-10-26 22:23:26 +08:00
|
|
|
dart-sdk: [stable]
|
2023-10-25 23:15:53 +08:00
|
|
|
steps:
|
2023-10-26 00:09:25 +08:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-25 23:15:53 +08:00
|
|
|
- name: Set up Dart ${{ matrix.dart-sdk }}
|
|
|
|
uses: dart-lang/setup-dart@v1
|
|
|
|
with:
|
|
|
|
sdk: ${{ matrix.dart-sdk}}
|
|
|
|
- name: Run format
|
|
|
|
run: dart format codes/dart
|
|
|
|
- name: Run analyze
|
|
|
|
run: dart analyze codes/dart
|
|
|
|
- name: Run build
|
|
|
|
run: dart codes/dart/build.dart
|