Add triggers #3155
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Frontend Test | |
on: | |
push: | |
paths-ignore: | |
- 'rst/**' | |
- '.github/workflows/*-translation.yml' | |
workflow_dispatch: | |
env: | |
CMAKE_DUMMY_WEBUI: false | |
jobs: | |
webui-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
script: | |
- frontend | |
- cypress | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.8.0' | |
- uses: tarantool/setup-tarantool@v2 | |
with: | |
tarantool-version: '2.6' | |
################################################################## | |
# Setup rocks | |
- name: Cache rocks | |
uses: actions/cache@v3 | |
id: cache-rocks | |
with: | |
path: .rocks/ | |
key: webui-rocks-${{ hashFiles('*.rockspec') }}-03 | |
- | |
run: tarantoolctl rocks install luatest 0.5.7 | |
if: steps.cache-rocks.outputs.cache-hit != 'true' | |
################################################################## | |
# Cachce node_modules | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: webui/node_modules/ | |
key: node-modules-${{ hashFiles('webui/package-lock.json') }} | |
################################################################## | |
# Cachce webui bundle | |
- name: Cache webui bundle | |
uses: actions/cache@v3 | |
with: | |
path: | | |
webui/build/bundle.lua | |
webui/build/bundle.md5 | |
key: webui-bundle | |
################################################################## | |
# Cache cypress | |
- run: echo node_modules/.bin/ >> $GITHUB_PATH | |
- name: Cache cypress | |
if: matrix.script == 'cypress' | |
id: cache-cypress | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./node_modules | |
~/.cache/Cypress | |
key: cypress-7.7.0-${{ runner.os }}-02 | |
- | |
run: | | |
npm install [email protected] | |
npx cypress verify | |
if: > | |
matrix.script == 'cypress' && | |
steps.cache-cypress.outputs.cache-hit != 'true' | |
################################################################## | |
- run: tarantoolctl rocks make | |
# Stop Mono server. This server starts and listens to 8084 port that is | |
# used for tests. | |
- name: 'Stop Mono server' | |
run: sudo kill -9 $(sudo lsof -t -i tcp:8084) || true | |
- if: matrix.script == 'frontend' | |
run: ./frontend-test.sh | |
- if: matrix.script == 'cypress' | |
run: ./cypress-test.sh run | |
- name: Create upload folder for screenshots | |
uses: actions/upload-artifact@v3 | |
if: failure() && matrix.script == 'cypress' | |
with: | |
name: ${{ matrix.script }}-screenshots-from-server | |
path: webui/cypress/screenshots/ | |
retention-days: 5 | |
if-no-files-found: ignore | |
- name: Create upload folder for diff outputs | |
uses: actions/upload-artifact@v3 | |
if: failure() && matrix.script == 'cypress' | |
with: | |
name: ${{ matrix.script }}-snapshots-diff-output-from-server | |
path: webui/cypress/snapshots/**/__diff_output__/** | |
retention-days: 5 | |
if-no-files-found: ignore | |
- name: Create upload folder for snapshots | |
uses: actions/upload-artifact@v3 | |
if: always() && matrix.script == 'cypress' | |
with: | |
name: ${{ matrix.script }}-snapshots-from-server | |
path: webui/cypress/snapshots/ | |
retention-days: 1 | |
if-no-files-found: ignore | |
################################################################## | |
# Cleanup cached paths | |
- run: tarantoolctl rocks remove cartridge |