Add UI test step #247
Workflow file for this run
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
| # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Node.js CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [24.x] | |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm run lint:ci | |
| - name: Create local config for tests | |
| run: | | |
| echo 'module.exports = { usersDbConnection: { url: "http://localhost:5984" }};' > config/local.js | |
| - name: Run Integration tests | |
| run: DEBUG=replay* npm run coverage || echo 'Test run failed replay no longer is working with latest nano which uses node fetch' | |
| - name: Start docker compose services | |
| run: docker compose up -d && sleep 5 | |
| - name: Show docker compose logs | |
| run: docker compose logs --no-color --timestamps || true | |
| - name: Run setup | |
| run: npm run setup | |
| env: | |
| SOURCE_URL: ${{ secrets.SOURCE_URL }} | |
| DEBUG: 'none' | |
| - name: Run E2E tests | |
| run: REPLAY=bloody npm run test:deprecated | |
| env: | |
| SOURCE_URL: ${{ secrets.SOURCE_URL }} | |
| DEBUG: 'none' | |
| - name: Coveralls | |
| if: success() || failure() | |
| uses: coverallsapp/github-action@master | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run UI tests | |
| run: npm run test:ui | |
| env: | |
| BASE_URL: https://localhost:6984/prototype/_design/prototype | |
| - name: Upload Playwright report and traces for trace.playwright.dev | |
| uses: actions/upload-artifact@v5 | |
| if: ${{ !cancelled() }} # Upload even if the previous step failed | |
| with: | |
| name: test-results # Name of the artifact | |
| path: FieldDB/test-e2e/test-results/ # Path to the directory containing reports and traces | |
| retention-days: 30 |