From fc3b14e413e45fa239bce359a5648644afaf4c4c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Aug 2020 09:47:35 +0200 Subject: [PATCH] Limit github actions on PR --- .github/workflows/bundlewatch.yml | 3 ++- .github/workflows/test.yml | 4 ++++ scripts/build/client.sh | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml index 94536c74e..312bf6e64 100644 --- a/.github/workflows/bundlewatch.yml +++ b/.github/workflows/bundlewatch.yml @@ -34,7 +34,8 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - - uses: jackyef/bundlewatch-gh-action@master + - name: Angular bundlewatch + uses: jackyef/bundlewatch-gh-action@master with: build-script: npm run build -- --analyze-bundle bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03b925701..6edf3bf8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,11 @@ name: Test Suite on: push: + branches: + - develop + - master pull_request: + types: [synchronize, opened] schedule: - cron: '0 3 * * 1-5' diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 75da6765c..b2c2e3bfb 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -154,7 +154,9 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t done fi -cd ../ && npm run build:embed && cd client/ +if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then + cd ../ && npm run build:embed && cd client/ +fi # Copy runtime locales cp -r "./src/locale" "./dist/locale"