pad.pub0.org/.github/workflows/collaboration.yml

72 lines
3.1 KiB
YAML
Raw Normal View History

2021-03-13 16:54:30 +00:00
name: "Collaboration"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
jobs:
build:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Test
2021-03-14 10:42:56 +00:00
runs-on: ubuntu-latest
2021-03-13 20:53:19 +00:00
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
2021-03-14 10:54:26 +00:00
- name: Install XVFB
run: sudo apt-get install xvfb
2021-03-14 09:47:30 +00:00
- name: Install Cypress
run: npm install cypress -g
2021-03-14 13:29:22 +00:00
# - name: Create settings.json
# run: cp settings.json.template settings.json
# - name: Disable import/export rate limiting
# run: |
# sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
2021-03-13 19:24:01 +00:00
- name: Run Etherpad & Tests
run: |
2021-03-14 10:44:24 +00:00
node src/node/server.js &
2021-03-14 12:16:14 +00:00
# check for initial connectivity
2021-03-14 10:42:56 +00:00
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
2021-03-14 10:44:24 +00:00
cd src/tests/frontend
2021-03-14 12:16:14 +00:00
# build first
2021-03-14 13:42:02 +00:00
xvfb-run -a cypress run --spec cypress/integration/test.js --config-file cypress/cypress.json --config video=false
2021-03-14 12:16:14 +00:00
# run collaboration tests
2021-03-14 13:11:59 +00:00
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
2021-03-14 16:47:03 +00:00
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false &
xvfb-run -a cypress run --spec cypress/integration/collaborate.js --config-file cypress/cypress.json --config video=false,screenshotsFolder=cypress/screenshots
2021-03-14 13:42:02 +00:00
- uses: actions/upload-artifact@v2
if: always()
with:
2021-03-14 14:54:56 +00:00
name: cypress-videos
path: src/tests/frontend/cypress/videos/
- uses: actions/upload-artifact@v2
if: always()
with:
name: cypress-screenshots
path: src/tests/frontend/cypress/screenshots/