35
.gitea/workflows/dart-ci.yml
Normal file
35
.gitea/workflows/dart-ci.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Dart CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Dart SDK
|
||||
uses: dart-lang/setup-dart@v1
|
||||
with:
|
||||
sdk: '3.10.0-290.4.beta' # 可选: stable, beta, dev 或具体版本如 3.3.0
|
||||
|
||||
- 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
|
||||
|
||||
- name: Run tests
|
||||
run: dart test
|
||||
|
||||
- name: Build executable
|
||||
run: dart compile exe bin/server.dart -o build/loongyan
|
||||
Reference in New Issue
Block a user