Skip to content

Rete QA for react v18 #64

Rete QA for react v18

Rete QA for react v18 #64

Workflow file for this run

name: Rete QA Regression
run-name: Rete QA for ${{ inputs.name }} v${{ inputs.version }}
on:
workflow_call:
inputs:
name:
required: true
type: string
version:
required: true
type: number
node:
type: number
qa:
type: string
default: 'rete-qa@latest'
kit:
type: string
default: 'rete-kit@latest'
workflow_dispatch:
inputs:
name:
required: true
type: choice
description: Stack
options:
- react
- vue
- angular
- svelte
version:
required: true
type: number
description: Stack version
node:
type: number
description: 'Node.js version (default: 16)'
qa:
description: 'Rete QA (<name>@<version> or <owner>/<repo>#<version>)'
type: string
default: 'rete-qa@latest'
kit:
description: 'Rete Kit (<name>@<version> or <owner>/<repo>#<version>)'
type: string
default: 'rete-kit@latest'
jobs:
prepare:
uses: ./.github/workflows/prepare-qa-kit.yml
secrets: inherit
init:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [prepare]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node || 16 }}
- name: Cache global node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-${{ inputs.node || 16 }}-cache-global-node-modules
- name: Download artifact with Rete QA
uses: actions/download-artifact@v4
if: needs.prepare.outputs.qa-artifact
with:
name: ${{ needs.prepare.outputs.qa-artifact }}
path: .
- name: Download artifact with Rete Kit
uses: actions/download-artifact@v4
if: needs.prepare.outputs.kit-artifact
with:
name: ${{ needs.prepare.outputs.kit-artifact }}
path: .
- name: Install Rete QA
run: npm i -g ${{ needs.prepare.outputs.qa-path }} ${{ needs.prepare.outputs.kit-path }}
- name: Init application
run: rete-qa init -s ${{ inputs.name }} -sv ${{ inputs.version }}
env:
CI: ""
- name: Prune node_modules
run: npx rimraf --glob **/node_modules
working-directory: .rete-qa
- uses: actions/upload-artifact@v4
with:
name: rete-qa-${{ inputs.name }}-v${{ inputs.version }}
path: .rete-qa
retention-days: 3
test:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [init,prepare]
strategy:
fail-fast: false
matrix:
browser: [chromium,firefox,webkit]
steps:
- name: Install fonts
run: |
sudo apt-get -qqy update
sudo apt-get -qqy --no-install-recommends install \
libfontconfig \
libfreetype6 \
xfonts-cyrillic \
xfonts-scalable \
fonts-liberation \
fonts-ipafont-gothic \
fonts-wqy-zenhei \
fonts-tlwg-loma-otf \
fonts-freefont-ttf
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get -qyy clean
- uses: actions/download-artifact@v4
with:
name: rete-qa-${{ inputs.name }}-v${{ inputs.version }}
path: .rete-qa
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node || 16 }}
- name: Cache global node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-${{ inputs.node || 16 }}-cache-global-node-modules
- name: Download artifact with Rete QA
uses: actions/download-artifact@v4
if: needs.prepare.outputs.qa-artifact
with:
name: ${{ needs.prepare.outputs.qa-artifact }}
path: .
- name: Download artifact with Rete Kit
uses: actions/download-artifact@v4
if: needs.prepare.outputs.kit-artifact
with:
name: ${{ needs.prepare.outputs.kit-artifact }}
path: .
- name: Install Rete QA
run: npm i -g ${{ needs.prepare.outputs.qa-path }} ${{ needs.prepare.outputs.kit-path }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps ${{ matrix.browser }}
- name: Run Playwright tests
run: rete-qa test -s ${{ inputs.name }} -sv ${{ inputs.version }} --project ${{ matrix.browser }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: test-results/
retention-days: 7