extend wait for webserver to start #2308
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
# This workflow performs basic checks: | |
# | |
# 1. run a preparation step to install and cache node modules | |
# 2. once prep succeeds, run lint and test in parallel | |
# | |
# The checks are skipped on the 'main' branch. The project relies on branch | |
# protection to avoid pushes straight to 'main'. | |
name: Checks | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
env: | |
NODE: 20 | |
jobs: | |
prep: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Use Node.js ${{ env.NODE }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE }} | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
.veda/ui/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | |
- name: Install | |
run: ./.veda/setup | |
test: | |
needs: prep | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Use Node.js ${{ env.NODE }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE }} | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
.veda/ui/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | |
- name: Install | |
run: ./.veda/setup | |
- name: Test | |
run: yarn test | |
playwright_test: | |
timeout-minutes: 60 | |
needs: prep | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Use Node.js ${{ env.NODE }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE }} | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
.veda/ui/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | |
- name: Install dependencies | |
run: yarn | |
- name: Install UI | |
run: ./.veda/setup | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: MAPBOX_TOKEN="${{secrets.MAPBOX_TOKEN}}" yarn test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |