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

45 lines
1.5 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 09:47:30 +00:00
- name: Install Cypress
run: npm install cypress -g
2021-03-13 19:24:01 +00:00
- name: Run Etherpad & Tests
run: |
2021-03-13 16:54:30 +00:00
node src\node\server.js &
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-13 19:12:54 +00:00
cd src\tests\frontend
2021-03-14 10:19:00 +00:00
cypress run --spec cypress\integration\collaborate.js --config-file cypress\cypress.json --config videosFolder=cypress/videos/browser1 &
2021-03-14 10:42:56 +00:00
cypress run --spec cypress\integration\collaborate.js --config-file cypress\cypress.json --config videosFolder=cypress/videos/browser2
# We still to do a curl check above just to ensure Etherpad is responding before cypress starts
2021-03-13 18:27:59 +00:00
2021-03-13 20:28:18 +00:00
- uses: actions/upload-artifact@v2
2021-03-13 18:27:59 +00:00
if: always()
with:
name: cypress-videos
2021-03-13 20:28:18 +00:00
path: src/tests/frontend/cypress/videos/