Bump formidable from 3.5.2 to 3.5.4 (#569) #2366
This file contains hidden or 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: 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 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run linting | |
run: | | |
npm ci | |
npm run 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://localhost:3000" >> .env | |
- name: Run tests | |
run: | | |
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: 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 | |
run: | | |
echo "AIDBOX_LICENSE=${{ secrets.AIDBOX_LICENSE }}" > .env | |
- name: Build Query Connector and Run Playwright Tests | |
id: run_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_tests.outcome == 'failure' | |
run: exit 1 # Force the workflow to fail if tests failed |