Add automation to importers UI #162
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 Coverage | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| branches: | |
| - "main" | |
| workflow_call: | |
| merge_group: | |
| concurrency: | |
| group: ci-coverage-e2e-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: install dependencies | |
| run: npm ci --verbose --ignore-scripts --no-audit | |
| - name: install trustify | |
| id: install-trustify | |
| uses: ./.github/actions/start-trustify | |
| with: | |
| ui_image: ${{ inputs.ui_image }} | |
| server_image: ${{ inputs.server_image }} | |
| server_db_image: ${{ inputs.server_db_image }} | |
| - name: trustify-ui - start in dev mode | |
| run: | | |
| AUTH_REQUIRED=false npm run start:dev & echo "dev ui started" | |
| - name: trustify-ui - wait | |
| run: | | |
| until curl -s http://localhost:3000 | grep -qi "<html"; do | |
| echo "Waiting for HTML page" | |
| sleep 2 | |
| done | |
| - name: Tests with coverage | |
| working-directory: e2e | |
| run: | | |
| PW_TEST_CONNECT_WS_ENDPOINT=ws://localhost:${{ steps.install-trustify.outputs.playwright_port }}/ TRUSTIFY_UI_URL=http://localhost:3000 AUTH_REQUIRED=false npm run test:ui | |
| ls -la .nyc_output | |
| - name: Generate coverage report | |
| run: | | |
| npx nyc report --temp-dir e2e/.nyc_output --reporter=html --reporter=text --reporter=lcov | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: trustification/trustify-ui |