-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 2.14 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Continuous Integration
on:
pull_request:
branches:
- main
jobs:
unit_tests:
name: Run NDC tests
runs-on: ubuntu-20.04
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
with:
path: cosmos
- name: Log in to GitHub Container Registry 📦
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build connector
run: |
cd cosmos
rm -rf node_modules dist config.json
npm install
npm run build
- name: Generate the connector configuration
# temporary-solution: starting jaeger-tracing in the background to avoid ECONNREFUSED on opentelemetry
run: |
cd cosmos
docker compose up -d
chmod +x ./dist/cli/index.js
export AZURE_COSMOS_KEY=Bh3EVxRH6BsUnger4tfXkKAvUenZhVosnvNpk185PyYZ9wd4qZO1kf7Y6hvERc7EUUJUE9j8RvDNACDbsgKqLg==
export AZURE_COSMOS_ENDPOINT=https://test-azure-cosmos-one.documents.azure.com:443/
export AZURE_COSMOS_DB_NAME=azure-cosmos-one
./dist/cli/index.js update
- name: Start connector
run: |
cd cosmos
export AZURE_COSMOS_KEY=Bh3EVxRH6BsUnger4tfXkKAvUenZhVosnvNpk185PyYZ9wd4qZO1kf7Y6hvERc7EUUJUE9j8RvDNACDbsgKqLg==
export AZURE_COSMOS_ENDPOINT=https://test-azure-cosmos-one.documents.azure.com:443/
export AZURE_COSMOS_DB_NAME=azure-cosmos-one
export HASURA_CONFIGURATION_DIRECTORY="."
npm run start serve -- --configuration . &
- name: Checkout ndc-spec
uses: actions/checkout@v3
with:
repository: hasura/ndc-spec
path: ndc-spec
- name: Run ndc-test
working-directory: ndc-spec
# temporary-solution: the --no-validate-responses flag is used to avoid the errors from the changes in ndc-spec in [PR:141](https://github.com/hasura/ndc-spec/pull/141)
run: cargo run --bin ndc-test -- replay --endpoint http://0.0.0.0:8080 --snapshots-dir ../cosmos/ndc-test-snapshots --no-validate-responses