67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
name: "Windows Zip"
|
|
|
|
# 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: Building Windows Zip on Linux without plugins
|
|
runs-on: ubuntu-latest
|
|
|
|
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
|
|
|
|
- name: Run the backend tests
|
|
run: cd src && npm test
|
|
|
|
- name: Build the .zip
|
|
run: src/bin/buildForWindows.sh
|
|
|
|
- name: Archive production artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: etherpad-lite-win.zip
|
|
path: etherpad-lite-win.zip
|
|
|
|
|
|
deploy:
|
|
# 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: Deploy Windows Zip on Windows
|
|
needs: build
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Download zip
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: etherpad-lite-win.zip
|
|
|
|
- name: Extract Etherpad
|
|
run: 7z x etherpad-lite-win.zip -oetherpad
|
|
|
|
- name: list
|
|
run: dir etherpad
|
|
|
|
- name: Run Etherpad
|
|
run: |
|
|
cd etherpad
|
|
node node_modules\ep_etherpad-lite\node\server.js &
|
|
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
|