Skip to content

Commit

Permalink
Run build and test workflow on all branches
Browse files Browse the repository at this point in the history
* Skips feature branches
* Use the `.nvmrc` file for the `node` version instead of a hard-coded
version.
* Always install the latest version of `chromedriver`.

Resolves opensearch-project#1023

Signed-off-by: Tommy Markley <markleyt@amazon.com>
  • Loading branch information
Tommy Markley committed Feb 8, 2022
1 parent bf6bde3 commit 1b13cfb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/pr_check_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

name: Build and test

# trigger on every commit push and PR for all branches except feature branches
on:
push:
branches: [ main ]
branches: [ '**', '!feature/**' ]
pull_request:
branches: [ main ]
branches: [ '**', '!feature/**' ]

env:
CACHE_NAME: osd-node-modules
Expand Down Expand Up @@ -64,7 +65,7 @@ jobs:
if: steps.job_successful.outputs.job_successful != 'true'
uses: actions/setup-node@v2
with:
node-version: "14.18.2"
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
Expand Down Expand Up @@ -161,7 +162,7 @@ jobs:
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
uses: actions/setup-node@v2
with:
node-version: "14.18.2"
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
# github virtual env is the latest chrome
- name: Setup chromedriver
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
run: yarn add --dev chromedriver@97.0.0
run: yarn add --dev chromedriver

- name: Run bootstrap
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
Expand Down

0 comments on commit 1b13cfb

Please sign in to comment.