Nested field filtering #176
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-latest | |
steps: | |
- name: Checkout (GitHub) | |
uses: actions/checkout@v3 | |
with: | |
path: cosmos | |
# - name: Set up Docker | |
# uses: docker-practice/actions-setup-docker@master | |
# - name: Pull and run Azure Cosmos DB Emulator | |
# run: | | |
# docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator | |
# docker run -d --name=cosmos-emulator -p 8081:8081 -p 10251:10251 -p 10252:10252 -p 10253:10253 -p 10254:10254 \ | |
# -e AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 \ | |
# -e AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=false \ | |
# mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator | |
# - name: Wait for Cosmos DB Emulator to be ready | |
# run: | | |
# timeout 300 bash -c 'until curl -ks https://localhost:8081/_explorer/emulator.pem > /dev/null; do sleep 5; done' | |
# echo "Cosmos DB Emulator is ready" | |
# - name: Download Cosmos DB Emulator certificate | |
# run: | | |
# curl -k https://localhost:8081/_explorer/emulator.pem > emulatorcert.crt | |
# sudo cp emulatorcert.crt /usr/local/share/ca-certificates/ | |
# sudo update-ca-certificates | |
- name: Build connector | |
run: | | |
cd cosmos | |
npm install | |
npm run build | |
- name: Download NDC Test Binary | |
run: | | |
curl -L https://github.com/hasura/ndc-spec/releases/download/v0.1.6/ndc-test-x86_64-unknown-linux-gnu -o ndc-test | |
chmod +x ndc-test | |
./ndc-test --version # Optional: Verify the binary works | |
sudo mv ndc-test /usr/local/bin/ | |
- name: Verify the ndc-test binary is accessible | |
run: | | |
ndc-test -V | |
- name: Run tests | |
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 | |
npm run ndc-test |