update README and other docs #113
Workflow file for this run
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
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 | |
npm install | |
npm run build | |
- name: Generate the connector configuration | |
env: | |
AZURE_COSMOS_KEY: ${{ secrets.AZURE_COSMOS_KEY }} | |
AZURE_COSMOS_ENDPOINT: ${{ secrets.AZURE_COSMOS_ENDPOINT }} | |
AZURE_COSMOS_DB_NAME: ${{ secrets.AZURE_COSMOS_DB_NAME }} | |
run: | | |
cd cosmos | |
chmod +x ./dist/cli/index.js | |
./dist/cli/index.js update | |
- name: Start connector | |
env: | |
AZURE_COSMOS_KEY: ${{ secrets.AZURE_COSMOS_KEY }} | |
AZURE_COSMOS_ENDPOINT: ${{ secrets.AZURE_COSMOS_ENDPOINT }} | |
AZURE_COSMOS_DB_NAME: ${{ secrets.AZURE_COSMOS_DB_NAME }} | |
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 |