-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add nbtest job to the GitHub Actions CI
- Loading branch information
1 parent
fb3ea3a
commit 5ac3f48
Showing
6 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: notebook-tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0 | ||
env: | ||
discovery.type: single-node | ||
xpack.security.enabled: false | ||
xpack.security.http.ssl.enabled: false | ||
xpack.license.self_generated.type: trial | ||
ports: | ||
- 9200:9200 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: sleep 30 | ||
- run: MOCK_ES=1 FORCE_COLOR=1 make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This module is provided to nbtest when running under GitHub Actions CI to | ||
# mock the Elasticsearch client to always connect on localhost, regardless of | ||
# arguments provided | ||
|
||
import elasticsearch | ||
|
||
orig_es_init = elasticsearch.Elasticsearch.__init__ | ||
|
||
|
||
def patched_es_init(self, *args, **kwargs): | ||
if 'cloud_id' in kwargs: | ||
assert kwargs['cloud_id'] == 'foo' | ||
if 'api_key' in kwargs: | ||
assert kwargs['api_key'] == 'bar' | ||
return orig_es_init(self, 'http://localhost:9200') | ||
|
||
|
||
elasticsearch.Elasticsearch.__init__ = patched_es_init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
masks: | ||
- 'Score: [0-9]+\.[0-9][0-9]*' |