Skip to content

Add some improvements to the valuset ingestion flow #3555

Add some improvements to the valuset ingestion flow

Add some improvements to the valuset ingestion flow #3555

Workflow file for this run

name: CI
on:
pull_request:
branches:
- "**"
merge_group:
types:
- checks_requested
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 22 # Adjust the Node.js version as needed
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run lint
uses: ./.github/actions/lint
unit-and-integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install dependencies
run: |
npm ci
- name: Create .env
run: |
echo "AIDBOX_LICENSE=${{ secrets.AIDBOX_LICENSE }}" > .env
echo "AIDBOX_BASE_URL=http://localhost:8080" >> .env
echo "APP_HOSTNAME=http://query-connector:3000" >> .env
- name: Run tests
id: run_unit_and_integration_tests
run: |
sudo mkdir keys
sudo chmod -R 755 keys
sudo chown -R $USER:$USER keys
npm run test:ci
# uncomment these next few lines and the corresponding log import
# in the setup script you're trying to debug if you're having trouble
# in CI. All the best, brave engineer ( ̄^ ̄ )ゞ
# continue-on-error: true
# - name: Upload Docker Logs
# uses: actions/upload-artifact@v4
# with:
# name: docker-logs
# path: |
# ./test-results/logs-before-tests.txt
# ./test-results/logs-after-tests.txt
# - name: Exit with proper code
# if: steps.run_unit_and_integration_tests.outcome == 'failure'
# run: exit 1 # Force the workflow to fail if tests failed
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CDCgov/dibbs-query-connector
end-to-end-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Create .env
env:
AIDBOX_LICENSE: ${{ secrets.AIDBOX_LICENSE }}
MTLS_CERT_B64: ${{ secrets.MTLS_CERT_B64 }}
MTLS_KEY_B64: ${{ secrets.MTLS_KEY_B64 }}
run: |
{
echo "AIDBOX_LICENSE=$AIDBOX_LICENSE"
echo "MTLS_CERT=$MTLS_CERT_B64"
echo "MTLS_KEY=$MTLS_KEY_B64"
echo "NEXT_PUBLIC_AUTH_PROVIDER=keycloak"
echo "RUN_FETCH_INTERCEPTOR=true"
} > .env
- name: Build Query Connector and Run Playwright Tests
id: run_e2e_tests
run: |
bash ./setup-scripts/e2e_tests.sh
# uncomment these next few lines and the corresponding log import
# in the setup script you're trying to debug if you're having trouble
# in CI. All the best, brave engineer ( ̄^ ̄ )ゞ
# continue-on-error: true
# - name: Upload Docker Logs
# uses: actions/upload-artifact@v4
# with:
# name: docker-logs
# path: |
# ./test-results/logs-before-tests.txt
# ./test-results/logs-after-tests.txt
# - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: test-results
# path: ./test-results/
# - name: Exit with proper code
# if: steps.run_e2e_tests.outcome == 'failure'
# run: exit 1 # Force the workflow to fail if tests failed