jd/implements automatic logout modal #1824
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: 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: 18 # Adjust the Node.js version as needed | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run linting | |
working-directory: ./query-connector | |
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: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup reporting action and run tests | |
uses: ArtiomTr/jest-coverage-report-action@v2 | |
with: | |
test-script: npm run test:ci | |
working-directory: ./query-connector | |
skip-step: none | |
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 | |
working-directory: ./query-connector | |
run: npm ci | |
- name: Install Playwright Browsers | |
working-directory: ./query-connector | |
run: npx playwright install --with-deps | |
- name: Create .env | |
working-directory: ./query-connector | |
run: | | |
echo "AIDBOX_LICENSE=${{ secrets.AIDBOX_LICENSE }}" > .env | |
echo "DATABASE_URL=postgresql://postgres:pw@localhost:5432/tefca_db" >> .env | |
- name: Build Query Connector and Run Playwright Tests | |
id: run_tests | |
working-directory: ./query-connector | |
run: | | |
bash ./setup-scripts/e2e_tests.sh | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: test-results | |
path: ./query-connector/test-results/ | |
- name: Exit with proper code | |
if: steps.run_tests.outcome == 'failure' | |
run: exit 1 # Force the workflow to fail if tests failed |