From f0369ca2169aec1b87bcda2f49655d2f75cbf28d Mon Sep 17 00:00:00 2001 From: Mark O'Sullivan Date: Tue, 26 Jul 2022 13:05:40 +0800 Subject: [PATCH 1/2] ci: added workflow for auto running tests and analyzer for newly opened prs to merge into master --- .github/workflows/ci-open-pr.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci-open-pr.yml diff --git a/.github/workflows/ci-open-pr.yml b/.github/workflows/ci-open-pr.yml new file mode 100644 index 0000000000..56f6b66dd7 --- /dev/null +++ b/.github/workflows/ci-open-pr.yml @@ -0,0 +1,25 @@ +# Runs all the unit tests and the analyzer for any PR opened to merge into master branch. +# +# This helps ensure we avoid breaking existing functionality and stick to the rules +# defined in the analysis_options.yaml file +name: run tests & analyzer for new pr + +on: + pull_request: + branches: [ master ] + + # allows for this workflow to be run manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1.3 + - name: get dependencies + run: dart pub get + - name: run tests + run: dart test + - name: run analyzer + run: dart analyze From 6d90eed38a6d1d8b7a42f20d253a4ec9c004944f Mon Sep 17 00:00:00 2001 From: Ratakondala Arun Date: Tue, 26 Jul 2022 10:53:34 +0530 Subject: [PATCH 2/2] chore(test): fix duplicate test runs --- .github/workflows/ci-open-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-open-pr.yml b/.github/workflows/ci-open-pr.yml index 56f6b66dd7..0b2ac19c70 100644 --- a/.github/workflows/ci-open-pr.yml +++ b/.github/workflows/ci-open-pr.yml @@ -20,6 +20,6 @@ jobs: - name: get dependencies run: dart pub get - name: run tests - run: dart test + run: dart test test/all_tests.dart - name: run analyzer run: dart analyze