Skip to content

Commit

Permalink
Update cypress github action config
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 5, 2022
1 parent a36aa4f commit 30d6cc4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: build-and-test
on: [push, workflow_dispatch]
jobs:
build:
name: Django tests
runs-on: ubuntu-20.04
strategy:
matrix:
Expand All @@ -28,5 +29,24 @@ jobs:
run: make
- name: Run eslint
run: npm run eslint
cypress:
name: Cypress run
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: install memcached headers
run: sudo apt install -y libmemcached-dev
- name: Run Integration Tests
run: make cypress
uses: cypress-io/github-action@v4
with:
command: npm run cypress:test
browser: chrome
headed: true
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"scripts": {
"test": "jest",
"cypress:run": "cypress run",
"cypress:chromerun": "cypress run --headless --browser chrome",
"cypress:chromeopen": "cypress open --browser chrome",
"cypress:chromehead": "cypress run --headed --browser chrome",
"cypress:ffrun": "cypress run --headless --browser firefox",
"cypress:ffopen": "cypress open --browser firefox",
"cypress:ffhead": "cypress run --browser firefox",
"cypress:test": "start-server-and-test 'make integrationserver' http-get://localhost:8000 cypress:ffhead",
"cypress:ffhead": "cypress run --headed --browser firefox",
"cypress:test": "start-server-and-test 'make integrationserver' http-get://localhost:8000 cypress:chromehead",
"dev": "webpack --mode development --watch",
"eslint": "eslint media/js/app media/js/src media/js/src/*.jsx media/js/src/**/*.jsx media/js/pdf/*.js *.js",
"build": "webpack"
Expand Down

0 comments on commit 30d6cc4

Please sign in to comment.