ci: github workflows
parent
4862d6fa9c
commit
21cc298d6d
|
@ -0,0 +1,50 @@
|
||||||
|
name: "Frontend admin tests"
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
withplugins:
|
||||||
|
name: with plugins
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run sauce-connect-action
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
|
||||||
|
run: tests/frontend/travis/sauce_tunnel.sh
|
||||||
|
|
||||||
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: bin/installDeps.sh
|
||||||
|
|
||||||
|
# We intentionally install a much old ep_align version to test update minor versions
|
||||||
|
- name: Install etherpad plugins
|
||||||
|
run: npm install ep_align@0.2.27
|
||||||
|
|
||||||
|
- name: export GIT_HASH to env
|
||||||
|
id: environment
|
||||||
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
||||||
|
|
||||||
|
- name: Write custom settings.json with loglevel WARN
|
||||||
|
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
|
||||||
|
|
||||||
|
- name: Write custom settings.json that enables the Admin UI tests
|
||||||
|
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"
|
||||||
|
|
||||||
|
- name: Remove standard frontend test files, so only admin tests are run
|
||||||
|
run: mv tests/frontend/specs/* /tmp && mv /tmp/admin*.js tests/frontend/specs
|
||||||
|
|
||||||
|
- name: Run the frontend admin tests
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
|
||||||
|
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
||||||
|
run: |
|
||||||
|
tests/frontend/travis/runner.sh
|
|
@ -88,6 +88,9 @@ jobs:
|
||||||
- name: Write custom settings.json with loglevel WARN
|
- name: Write custom settings.json with loglevel WARN
|
||||||
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
|
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
|
||||||
|
|
||||||
|
- name: Write custom settings.json that enables the Admin UI tests
|
||||||
|
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"
|
||||||
|
|
||||||
# XXX we should probably run all tests, because plugins could effect their results
|
# XXX we should probably run all tests, because plugins could effect their results
|
||||||
- name: Remove standard frontend test files, so only plugin tests are run
|
- name: Remove standard frontend test files, so only plugin tests are run
|
||||||
run: rm src/tests/frontend/specs/*
|
run: rm src/tests/frontend/specs/*
|
||||||
|
|
|
@ -18,6 +18,11 @@ _set_loglevel_warn: &set_loglevel_warn |
|
||||||
settings.json.template >settings.json.template.new &&
|
settings.json.template >settings.json.template.new &&
|
||||||
mv settings.json.template.new settings.json.template
|
mv settings.json.template.new settings.json.template
|
||||||
|
|
||||||
|
_enable_admin_tests: &enable_admin_tests |
|
||||||
|
sed -e 's/"enableAdminUITests": false/"enableAdminUITests": true,\n"users":{"admin":{"password":"changeme","is_admin":true}}/' \
|
||||||
|
settings.json.template >settings.json.template.new &&
|
||||||
|
mv settings.json.template.new settings.json.template
|
||||||
|
|
||||||
_install_libreoffice: &install_libreoffice >-
|
_install_libreoffice: &install_libreoffice >-
|
||||||
sudo add-apt-repository -y ppa:libreoffice/ppa &&
|
sudo add-apt-repository -y ppa:libreoffice/ppa &&
|
||||||
sudo apt-get update &&
|
sudo apt-get update &&
|
||||||
|
@ -46,6 +51,7 @@ jobs:
|
||||||
name: "Test the Frontend without Plugins"
|
name: "Test the Frontend without Plugins"
|
||||||
install:
|
install:
|
||||||
- *set_loglevel_warn
|
- *set_loglevel_warn
|
||||||
|
- *enable_admin_tests
|
||||||
- "src/tests/frontend/travis/sauce_tunnel.sh"
|
- "src/tests/frontend/travis/sauce_tunnel.sh"
|
||||||
- "src/bin/installDeps.sh"
|
- "src/bin/installDeps.sh"
|
||||||
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
|
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
|
||||||
|
@ -80,6 +86,7 @@ jobs:
|
||||||
name: "Test the Frontend Plugins only"
|
name: "Test the Frontend Plugins only"
|
||||||
install:
|
install:
|
||||||
- *set_loglevel_warn
|
- *set_loglevel_warn
|
||||||
|
- *enable_admin_tests
|
||||||
- "src/tests/frontend/travis/sauce_tunnel.sh"
|
- "src/tests/frontend/travis/sauce_tunnel.sh"
|
||||||
- "src/bin/installDeps.sh"
|
- "src/bin/installDeps.sh"
|
||||||
- "rm src/tests/frontend/specs/*"
|
- "rm src/tests/frontend/specs/*"
|
||||||
|
|
Loading…
Reference in New Issue