mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-02 03:05:24 +08:00
* Retranslate the complete Japanese online edition from Chinese * Fit Japanese homepage labels and localize heading permalinks * Point Japanese contribution instructions to the Japanese preview * Replace locale conditionals with multilingual UI tables
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
# This workflow will install Dart SDK, run format, analyze and build with Dart
|
|
|
|
name: Dart
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/dart.yml"
|
|
- "codes/dart/**/*.dart"
|
|
- "en/codes/dart/**/*.dart"
|
|
- "ja/codes/dart/**/*.dart"
|
|
- "ko/codes/dart/**/*.dart"
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/dart.yml"
|
|
- "codes/dart/**/*.dart"
|
|
- "en/codes/dart/**/*.dart"
|
|
- "ja/codes/dart/**/*.dart"
|
|
- "ko/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", "ja/codes/dart", "ko/codes/dart"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up Dart ${{ matrix.dart-sdk }}
|
|
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c # 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 chapter examples
|
|
shell: bash
|
|
run: |
|
|
status=0
|
|
for file in "${{ matrix.code-dir }}"/chapter_*/*.dart; do
|
|
dart "$file" || status=1
|
|
done
|
|
exit "$status"
|