From 6f898c0c83cb1d1df111ae22e89eb19bea3f3384 Mon Sep 17 00:00:00 2001 From: Remi Rousselet Date: Sat, 28 Oct 2023 17:45:43 +0200 Subject: [PATCH] Sync dev with master (#3050) --- .github/workflows/build.yml | 1 + .github/workflows/changelog.yml | 32 +++++++++++++++++++ .github/workflows/check_generation.yml | 1 + .github/workflows/riverpod_lint.yml | 1 + .../build_yaml/test/build_yaml_test.dart | 28 ++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 .github/workflows/changelog.yml create mode 100644 packages/riverpod_generator/integration/build_yaml/test/build_yaml_test.dart diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a817f2ab..ab80d18f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: push: branches: - master + - dev paths-ignore: - "**.md" - "**.mdx" diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 000000000..86765bcbe --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,32 @@ +name: Check CHANGELOG.md + +on: + push: + branches: + - master + - dev + pull_request: + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3.1.0 + with: + fetch-depth: 2 + - uses: subosito/flutter-action@v2.7.1 + with: + channel: master + + - name: Add pub cache bin to PATH + run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH + - name: Add pub cache to PATH + run: echo "PUB_CACHE="$HOME/.pub-cache"" >> $GITHUB_ENV + + - name: Install "semantic_changelog" + run: dart pub global activate -s git https://github.com/rrousselGit/semantic_changelog + + - run: git fetch origin master:refs/remotes/origin/master + - run: semantic_changelog check origin/master \ No newline at end of file diff --git a/.github/workflows/check_generation.yml b/.github/workflows/check_generation.yml index 2c6679327..629ab50cd 100644 --- a/.github/workflows/check_generation.yml +++ b/.github/workflows/check_generation.yml @@ -7,6 +7,7 @@ on: push: branches: - master + - dev paths-ignore: - "**.md" diff --git a/.github/workflows/riverpod_lint.yml b/.github/workflows/riverpod_lint.yml index 3747dcec7..ae92a03b8 100644 --- a/.github/workflows/riverpod_lint.yml +++ b/.github/workflows/riverpod_lint.yml @@ -7,6 +7,7 @@ on: push: branches: - master + - dev paths-ignore: - "**.md" schedule: diff --git a/packages/riverpod_generator/integration/build_yaml/test/build_yaml_test.dart b/packages/riverpod_generator/integration/build_yaml/test/build_yaml_test.dart new file mode 100644 index 000000000..f03578c84 --- /dev/null +++ b/packages/riverpod_generator/integration/build_yaml/test/build_yaml_test.dart @@ -0,0 +1,28 @@ +import 'package:build_yaml/main.dart'; +import 'package:test/test.dart'; + +void main() { + test('provider names', () { + expect(countPod.name, 'countPod'); + expect(countFuturePod.name, 'countFuturePod'); + expect(countStreamPod.name, 'countStreamPod'); + expect(countNotifierPod.name, 'countNotifierPod'); + expect(countAsyncNotifierPod.name, 'countAsyncNotifierPod'); + expect(countStreamNotifierPod.name, 'countStreamNotifierPod'); + }); + + test('provider family names', () { + expect(count2ProviderFamily.name, 'count2ProviderFamily'); + expect(countFuture2ProviderFamily.name, 'countFuture2ProviderFamily'); + expect(countStream2ProviderFamily.name, 'countStream2ProviderFamily'); + expect(countNotifier2ProviderFamily.name, 'countNotifier2ProviderFamily'); + expect( + countAsyncNotifier2ProviderFamily.name, + 'countAsyncNotifier2ProviderFamily', + ); + expect( + countStreamNotifier2ProviderFamily.name, + 'countStreamNotifier2ProviderFamily', + ); + }); +}