Switch search backend from Lunr to Elasticsearch (#31257)
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
This commit is contained in:
23
.github/workflows/browser-test.yml
vendored
23
.github/workflows/browser-test.yml
vendored
@@ -27,10 +27,26 @@ concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
ELASTICSEARCH_URL: http://localhost:9200/
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
|
||||
steps:
|
||||
- name: Install a local Elasticsearch for testing
|
||||
# For the sake of saving time, only run this step if the test-group
|
||||
# is one that will run tests against an Elasticsearch on localhost.
|
||||
uses: getong/elasticsearch-action@95b501ab0c83dee0aac7c39b7cea3723bef14954
|
||||
with:
|
||||
# Make sure this matches production and `sync-search-pr.yml`
|
||||
elasticsearch version: '7.11.1'
|
||||
host port: 9200
|
||||
container port: 9200
|
||||
host node port: 9300
|
||||
node port: 9300
|
||||
discovery type: 'single-node'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
@@ -62,5 +78,12 @@ jobs:
|
||||
- name: Run build script
|
||||
run: npm run build
|
||||
|
||||
- name: Index fixtures into the local Elasticsearch
|
||||
run: npm run index-test-fixtures
|
||||
|
||||
- name: Check that Elasticsearch is accessible
|
||||
run: |
|
||||
curl --fail --retry-connrefused --retry 5 -I ${{ env.ELASTICSEARCH_URL }}
|
||||
|
||||
- name: Run browser-test
|
||||
run: npm run browser-test
|
||||
|
||||
Reference in New Issue
Block a user