From 97d69d281605535ad2363c110ec8b5e87febbd7d Mon Sep 17 00:00:00 2001 From: Oliver Shi Date: Tue, 16 Aug 2022 12:02:05 -0400 Subject: [PATCH] fix compilation_check_for_test_site (#213) In a github workflow the `cd` command only affects the current step. This was causing false positives. Also fix a casing issue with a test-site import on the js side. J=NONE TEST=manual checked out a branch that should be failing, saw it fail locally, but succeed in the PR it's in in the github workflow logs for the PR it's in, I see the regular search-core build being run twice, and the test-site build not being run --- .github/workflows/run-tests.yml | 14 ++++---------- test-site/src/js/index.js | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 368ffd7f..863900a2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,13 +12,7 @@ jobs: build_script: npm run build-ci compilation_check_for_test_site: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - - run: npm ci - - run: npm run build - - run: cd test-site - - run: npm i - - run: npm run build + uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1 + with: + test_script: cd test-site && npm i && npm run build + node_matrix: '["16.x"]' diff --git a/test-site/src/js/index.js b/test-site/src/js/index.js index 8ce2e33b..19a7ed73 100644 --- a/test-site/src/js/index.js +++ b/test-site/src/js/index.js @@ -3,7 +3,7 @@ import { provideCore } from '@yext/search-core'; import verticalRequest from './requests/verticalRequest'; import universalRequest from './requests/universalRequest'; import questionRequest from './requests/questionRequest'; -import { univeralAutocompleteRequest, verticalAutocompleteRequest, filterSearchRequest } from './requests/autoCompleteRequests'; +import { univeralAutocompleteRequest, verticalAutocompleteRequest, filterSearchRequest } from './requests/autocompleteRequests'; const coreConfig = { apiKey: 'df4b24f4075800e5e9705090c54c6c13',