build: setup dart simple ci using github actions (#114)

This commit is contained in:
Alexandre Roux
2021-10-04 21:27:37 +02:00
committed by GitHub
parent e198424da8
commit 09ace76b82
5 changed files with 88 additions and 0 deletions

32
.github/workflows/ci_dart.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Run CI
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # every sunday at midnight
jobs:
test:
name: Test on ${{ matrix.os }} / ${{ matrix.flutter }}
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: packages/repo_support
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
flutter: [stable, beta, dev]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: ${{ matrix.flutter }}
- run: flutter --version
- run: flutter upgrade
- run: dart --version
- run: dart pub get
- run: dart run tool/run_ci.dart

23
packages/repo_support/.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
# See https://www.dartlang.org/guides/libraries/private-files
# Files and directories created by pub
.dart_tool/
.packages
.pub/
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
# Intellij
*.idea/
*.iml
# VS code
.vscode
# Local
.local/

View File

@@ -0,0 +1,8 @@
# repo_support
App flutter utils repo support
```
dart run tool/run_ci.dart
```

View File

@@ -0,0 +1,11 @@
name: simplex_repo_support
description: SimpleX build tools
version: 0.2.0
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
dev_dependencies:
dev_test:

View File

@@ -0,0 +1,14 @@
// ignore_for_file: prefer_double_quotes
import 'package:dev_test/package.dart';
import 'package:path/path.dart';
Future main() async {
for (var dir in [
'simplex_app',
'simplexmq',
'repo_support',
]) {
await packageRunCi(join('..', dir));
}
}