-
Notifications
You must be signed in to change notification settings - Fork 15.4k
41 lines (37 loc) · 1.02 KB
/
Copy pathdart.yml
File metadata and controls
41 lines (37 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This workflow will install Dart SDK, run format, analyze and build with Dart
name: Dart
on:
push:
branches: ["main"]
paths:
- "codes/dart/**/*.dart"
- "en/codes/dart/**/*.dart"
pull_request:
branches: ["main"]
paths:
- "codes/dart/**/*.dart"
- "en/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]
dart-sdk: [stable]
code-dir: ["codes/dart", "en/codes/dart"]
steps:
- uses: actions/checkout@v4
- name: Set up Dart ${{ matrix.dart-sdk }}
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart-sdk}}
- name: Run format
run: dart format ${{ matrix.code-dir }}
- name: Run analyze
run: dart analyze ${{ matrix.code-dir }}
- name: Run build
run: dart ${{ matrix.code-dir }}/build.dart