Skip to content

Commit

Permalink
enable CI for feature branch (#2010)
Browse files Browse the repository at this point in the history
Signed-off-by: Zhongnan Su <[email protected]>
  • Loading branch information
zhongnansu authored Aug 1, 2022
1 parent f7a3a54 commit 4da875c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}

Expand All @@ -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
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
defaults:
run:
working-directory: ./artifacts
strategy:
strategy:
matrix:
include:
- name: Linux x64
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -217,15 +217,15 @@ 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!

- 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
Expand All @@ -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:
Expand Down

0 comments on commit 4da875c

Please sign in to comment.