2021-03-13 17:54:30 +01:00
|
|
|
name: "Collaboration"
|
2021-03-13 17:46:14 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
2021-03-13 21:53:19 +01:00
|
|
|
|
2021-03-13 17:46:14 +01:00
|
|
|
steps:
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
path-type: inherit
|
|
|
|
install: >-
|
|
|
|
zip
|
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-03-13 21:34:09 +01:00
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules
|
|
|
|
with:
|
|
|
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-
|
|
|
|
${{ runner.os }}-
|
|
|
|
|
2021-03-13 17:46:14 +01:00
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
|
|
|
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
|
|
|
shell: msys2 {0}
|
|
|
|
run: src/bin/installDeps.sh
|
|
|
|
|
|
|
|
- name: Install Cypress
|
|
|
|
run: npm install cypress -g
|
|
|
|
|
2021-03-13 20:24:01 +01:00
|
|
|
- name: Run Etherpad & Tests
|
2021-03-13 17:46:14 +01:00
|
|
|
run: |
|
2021-03-13 17:54:30 +01:00
|
|
|
node src\node\server.js &
|
2021-03-13 20:12:54 +01:00
|
|
|
cd src\tests\frontend
|
2021-03-13 21:53:19 +01:00
|
|
|
cypress run --spec cypress\integration\collaborate.js --config-file cypress\cypress.json --config videosFolder=cypress/videos/browser1 &
|
|
|
|
cypress run --spec cypress\integration\collaborate.js --config-file cypress\cypress.json --config videosFolder=cypress/videos/browser2 &
|
|
|
|
cypress run --spec cypress\integration\collaborate.js --config-file cypress\cypress.json --config videosFolder=cypress/videos/browser3 &
|
|
|
|
cypress run --spec cypress\integration\collaborate.js --config-file cypress\cypress.json --config videosFolder=cypress/videos/browser4
|
2021-03-13 19:27:59 +01:00
|
|
|
|
2021-03-13 21:28:18 +01:00
|
|
|
- uses: actions/upload-artifact@v2
|
2021-03-13 19:27:59 +01:00
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: cypress-videos
|
2021-03-13 21:28:18 +01:00
|
|
|
path: src/tests/frontend/cypress/videos/
|