|
| 1 | +name: "Frontend tests" |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + withoutplugins: |
| 7 | + name: without plugins |
| 8 | + runs-on: ubuntu-latest |
| 9 | + |
| 10 | + steps: |
| 11 | + - name: Checkout repository |
| 12 | + uses: actions/checkout@v2 |
| 13 | + |
| 14 | + - name: Run sauce-connect-action |
| 15 | + shell: bash |
| 16 | + env: |
| 17 | + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} |
| 18 | + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} |
| 19 | + TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }} |
| 20 | + run: tests/frontend/travis/sauce_tunnel.sh |
| 21 | + |
| 22 | + - name: Install all dependencies and symlink for ep_etherpad-lite |
| 23 | + run: bin/installDeps.sh |
| 24 | + |
| 25 | + - name: export GIT_HASH to env |
| 26 | + id: environment |
| 27 | + run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})" |
| 28 | + |
| 29 | + - name: Write custom settings.json with loglevel WARN |
| 30 | + run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json" |
| 31 | + |
| 32 | + - name: Run the frontend tests |
| 33 | + shell: bash |
| 34 | + env: |
| 35 | + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} |
| 36 | + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} |
| 37 | + TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }} |
| 38 | + GIT_HASH: ${{ steps.environment.outputs.sha_short }} |
| 39 | + run: | |
| 40 | + tests/frontend/travis/runner.sh |
| 41 | +
|
| 42 | + withplugins: |
| 43 | + name: with plugins |
| 44 | + runs-on: ubuntu-latest |
| 45 | + |
| 46 | + steps: |
| 47 | + - name: Checkout repository |
| 48 | + uses: actions/checkout@v2 |
| 49 | + |
| 50 | + - name: Run sauce-connect-action |
| 51 | + shell: bash |
| 52 | + env: |
| 53 | + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} |
| 54 | + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} |
| 55 | + TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }} |
| 56 | + run: tests/frontend/travis/sauce_tunnel.sh |
| 57 | + |
| 58 | + - name: Install all dependencies and symlink for ep_etherpad-lite |
| 59 | + run: bin/installDeps.sh |
| 60 | + |
| 61 | + - name: Install etherpad plugins |
| 62 | + run: npm install ep_align ep_author_hover ep_cursortrace ep_font_size ep_hash_auth ep_headings2 ep_markdown ep_readonly_guest ep_spellcheck ep_subscript_and_superscript ep_table_of_contents ep_set_title_on_pad |
| 63 | + |
| 64 | + - name: export GIT_HASH to env |
| 65 | + id: environment |
| 66 | + run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})" |
| 67 | + |
| 68 | + - name: Write custom settings.json with loglevel WARN |
| 69 | + run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json" |
| 70 | + |
| 71 | + # XXX we should probably run all tests, because plugins could effect their results |
| 72 | + - name: Remove standard frontend test files, so only plugin tests are run |
| 73 | + run: rm tests/frontend/specs/* |
| 74 | + |
| 75 | + - name: Run the frontend tests |
| 76 | + shell: bash |
| 77 | + env: |
| 78 | + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} |
| 79 | + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} |
| 80 | + TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }} |
| 81 | + GIT_HASH: ${{ steps.environment.outputs.sha_short }} |
| 82 | + run: | |
| 83 | + tests/frontend/travis/runner.sh |
0 commit comments