Web UI frontend automated browser tests (#2223)

* First pass at basic browser tests for #1926

* Run tests against dev web server not go server

* Bundle the web code into the server before running tests

* Move cypress UI tests into its own npm project + add tests

* Add additional tests + wire up with cypress dashboard

* Limit concurrency of workflow jobs

* Temporarily comment out some tests that do not pass in mobile. Will fix later.
This commit is contained in:
Gabe Kangas
2022-11-04 20:04:13 -07:00
committed by GitHub
parent 5119e977c1
commit 352447e3d4
34 changed files with 5672 additions and 338 deletions

View File

@@ -14,6 +14,11 @@ on:
jobs:
test:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: earthly/actions-setup@v1
with:

19
.github/workflows/browser-testing.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Browser Tests
on: [push, pull_request_target]
jobs:
cypress-run:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- name: Run Browser tests
run: cd test/automated/browser && ./run.sh

View File

@@ -10,6 +10,11 @@ on:
jobs:
bundle:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Bundle web app (next.js build)
uses: actions/checkout@v3

View File

@@ -20,6 +20,10 @@ jobs:
run:
working-directory: ./web
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out code
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'renovate' }}

View File

@@ -18,6 +18,11 @@ jobs:
name: Go linter
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:

View File

@@ -18,6 +18,11 @@ env:
jobs:
api:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3

View File

@@ -17,6 +17,10 @@ jobs:
run:
working-directory: ./web
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout
@@ -43,6 +47,10 @@ jobs:
run:
working-directory: ./web
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v3

View File

@@ -16,6 +16,10 @@ jobs:
run:
working-directory: ./web
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: Build webapp
steps:
- name: Checkout

View File

@@ -1,4 +1,4 @@
name: Tests
name: Go Tests
on:
push: