Skip to content

An open-source cross-platform alternative to AirDrop

ci: add test workflow

Tien Do Nam1b32ad4376ca
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..a04e9edf
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,26 @@
+name: CI
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - uses: subosito/flutter-action@v2
+ with:
+ flutter-version: '3.3.10'
+ channel: 'stable'
+ - name: Dependencies
+ run: flutter pub get
+ - name: Build generated files
+ run: flutter pub run build_runner build -d
+ - name: Analyze
+ run: flutter analyze
+ - name: Test
+ run: flutter test
diff --git a/README.md b/README.md
index 2d06e885..9b182653 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# LocalSend
+![ci](https://github.com/localsend/localsend/actions/workflows/ci.yml/badge.svg)
+
Links: [Homepage](https://localsend.org)
| [Play Store](https://play.google.com/store/apps/details?id=org.localsend.localsend_app)
| [App Store](https://apps.apple.com/us/app/localsend/id1661733229)