Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/cypress_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Cypress Tests

on:
pull_request:

jobs:
cypress-tests:
name: Cypress Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
# test the lowest version, to make sure checks pass on it
php-version: 7.2
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
- uses: actions/setup-node@v1
with:
node-version: 12.5
# See https://github.community/t/sudo-apt-install-fails-with-failed-to-fetch-http-security-ubuntu-com-404-not-found-ip/17075
- run: sudo apt update
- name: Install dependencies
run: |
sudo composer self-update -q
sudo COMPOSER_MEMORY_LIMIT=-1 COMPOSER_PROCESS_TIMEOUT=60 composer update --prefer-dist --no-progress
./bin/console bolt:info --ansi
npm set progress=false
npm ci
mkdir -p ./var/log/e2e-reports/report/features/
touch ./var/log/e2e-reports/report/features/.gitkeep
# Install latest stable Chrome for e2e tests
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome*.deb
- name: Prepare environment
run: |
# build assets
npm run build
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
# prepare web server for e2e tests
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
./bin/console doctrine:fixtures:load --group=without-images -n
./bin/console server:start 127.0.0.1:8088
# test if web server works
sleep 3
wget "http://127.0.0.1:8088/bolt/login"

- name: Cypress run
uses: cypress-io/github-action@v2
8 changes: 8 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"integrationFolder": "tests/cypress/integration",
"pluginsFile": "tests/cypress/plugins/index.js",
"screenshotsFolder": "tests/cypress/screenshots",
"videosFolder": "tests/cypress/videos",
"supportFile": "tests/cypress/support/index.js",
"baseUrl": "http://127.0.0.1:8088"
}
Loading