Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed May 11, 2024
1 parent 8f0e697 commit 74187ee
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flutter-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./example/flutter/github_search
working-directory: ./examples/flutter/github_search
steps:
- uses: actions/checkout@v4

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/rxdart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Dart CI
on:
push:
branches: [ master ]
paths-ignore: [ '**.md', 'example/**' ]
paths-ignore: [ '**.md', 'examples/**' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md', 'example/**' ]
paths-ignore: [ '**.md', 'examples/**' ]
schedule:
# Runs at 00:00 UTC on the 1, 8, 15, 22 and 29th of every month.
- cron: '0 0 */7 * *'
workflow_dispatch:

jobs:
analyze-and-test:
runs-on: ubuntu-latest
Expand All @@ -28,25 +28,28 @@ jobs:
with:
sdk: ${{ matrix.sdk }}

- name: Install melos
run: dart pub global activate melos

- name: Print Dart version
run: dart --version

- name: Install dependencies
run: dart pub get
run: melos run pub-get-no-private

- name: Analyze
if: ${{ matrix.sdk == 'stable' }}
run: dart analyze --fatal-infos --fatal-warnings
run: melos run analyze-no-private

- name: Format code
if: ${{ matrix.sdk == 'stable' }}
run: dart format . --set-exit-if-changed
run: melos run format-no-private

- name: Active coverage
run: dart pub global activate coverage

- name: Run tests
run: dart pub run test test/rxdart_test.dart --chain-stack-traces
run: melos run test-rxdart

- name: Start Observatory
run: dart
Expand Down
6 changes: 6 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ scripts:
run: melos exec --no-private -- dart analyze .
analyze:
run: melos exec -- dart analyze .
format-no-private:
run: melos exec --no-private -- dart format . --set-exit-if-changed
format:
run: melos exec -- dart format . --set-exit-if-changed
pub-get-no-private:
run: melos exec --no-private -- dart pub get
test-rxdart:
run: |
cd \$MELOS_ROOT_PATH/packages/rxdart
Expand Down
4 changes: 2 additions & 2 deletions packages/rxdart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ In order to run the command line example, please follow these steps:

1. Clone this repo and enter the directory
2. Run `pub get`
3. Run `dart example/example.dart 10`
3. Run `dart examples/fibonacci/lib/example.dart 10`

### Flutter Example

Expand All @@ -250,7 +250,7 @@ To run the flutter example, you must have Flutter installed. For installation in

1. Open up an Android Emulator, the iOS Simulator, or connect an appropriate mobile device for debugging.
2. Open up a terminal
3. `cd` into the `example/flutter/github_search` directory
3. `cd` into the `examples/flutter/github_search` directory
4. Run `flutter doctor` to ensure you have all Flutter dependencies working.
5. Run `flutter packages get`
6. Run `flutter run`
Expand Down

0 comments on commit 74187ee

Please sign in to comment.