Skip to content

Commit

Permalink
ci: integrate github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sahani-deriv committed Nov 14, 2023
1 parent a612dab commit df99d90
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/all_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: all_packages

on:
push:
branches:
- master
- dev
pull_request:
branches:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@v1
with:
melos-version: "3.0.1"
- name: "Run Pub Get"
run: melos bootstrap
- name: "Run Analyze"
run: melos run analyze
- name: "Run Test"
run: melos run test
23 changes: 23 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ repository: https://github.com/regentmarkets/flutter-deriv-packages
packages:
- packages/*

ignore:
- packages/deriv_auth_ui

command:
version:
# Generate commit links in package changelogs.
Expand All @@ -16,3 +19,23 @@ command:
# https://github.com/dart-lang/pub/issues/3404). Disabling this feature
# makes the CI much more stable.
runPubGetInParallel: false

scripts:
analyze:
name: Flutter Analyze
description: Run flutter analyze for all packages.
run: flutter analyze
exec:
concurrency: 1
failFast: true

test:
name: Flutter Test
description: Run flutter test for all packages.
run: |
if [ -d "test" ]; then
flutter test
fi
exec:
consurrency: 1
failFast: true

0 comments on commit df99d90

Please sign in to comment.