From 4da875cac192ae949856e4ff41247518840605e6 Mon Sep 17 00:00:00 2001 From: Zhongnan Su Date: Mon, 1 Aug 2022 16:46:33 -0700 Subject: [PATCH] enable CI for feature branch (#2010) Signed-off-by: Zhongnan Su --- .github/workflows/build_and_test_workflow.yml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index d82d0f45bb04..307b56ad36ae 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -6,9 +6,9 @@ name: Build and test # trigger on every commit push and PR for all branches except feature branches and pushes for backport branches on: push: - branches: [ '**', '!feature/**', '!backport/**' ] + branches: ['**', '!backport/**'] pull_request: - branches: [ '**', '!feature/**' ] + branches: ['**'] env: TEST_BROWSER_HEADLESS: 1 @@ -34,7 +34,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version-file: ".nvmrc" + node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Setup Yarn @@ -73,9 +73,9 @@ jobs: image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2 options: --user 1001 name: Run functional tests - strategy: + strategy: matrix: - group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] + group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] steps: - run: echo Running functional tests for ciGroup${{ matrix.group }} @@ -85,7 +85,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version-file: ".nvmrc" + node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Setup Yarn @@ -121,7 +121,7 @@ jobs: defaults: run: working-directory: ./artifacts - strategy: + strategy: matrix: include: - name: Linux x64 @@ -141,7 +141,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version-file: "./artifacts/.nvmrc" + node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Setup Yarn @@ -169,9 +169,9 @@ jobs: name: ${{ matrix.suffix }}-${{ env.VERSION }} path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} retention-days: 1 - + bwc-tests: - needs: [ build-min-artifact-tests ] + needs: [build-min-artifact-tests] runs-on: ubuntu-latest container: image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2 @@ -180,9 +180,9 @@ jobs: defaults: run: working-directory: ./artifacts - strategy: + strategy: matrix: - version: [ osd-2.0.0, osd-2.1.0 ] + version: [osd-2.0.0, osd-2.1.0] steps: - name: Checkout code uses: actions/checkout@v2 @@ -195,7 +195,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version-file: "./artifacts/.nvmrc" + node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Setup Yarn @@ -217,7 +217,7 @@ jobs: if curl -I -L ${{ env.OPENSEARCH_URL }}; then echo "::set-output name=version-exists::true" fi - + - name: Skipping tests if: steps.verify-opensearch-exists.outputs.version-exists != 'true' run: echo Tests were skipped because an OpenSearch release build does not exist for this version yet! @@ -225,7 +225,7 @@ jobs: - name: Setting environment variable to run tests for ${{ matrix.version }} if: steps.verify-opensearch-exists.outputs.version-exists == 'true' run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV - + - name: Download OpenSearch Dashboards uses: actions/download-artifact@v3 id: download @@ -238,7 +238,7 @@ jobs: if: steps.verify-opensearch-exists.outputs.version-exists == 'true' run: | ./bwctest.sh -s false -o ${{ env.OPENSEARCH_URL }} -d ${{ steps.download.outputs.download-path }}/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz - + - uses: actions/upload-artifact@v3 if: ${{ failure() && steps.verify-opensearch-exists.outputs.version-exists == 'true' }} with: