Skip to content

fix: update local workflow #224

fix: update local workflow

fix: update local workflow #224

Workflow file for this run

name: Local e2e tests
on:
- push
jobs:
vite:
runs-on: ubuntu-latest
name: vite
concurrency:
group: ${{ github.ref }}-e2e-local-vite-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
data_provider:
[
custom-json-rest,
strapi-v4,
nestjsx-crud,
airtable,
supabase,
appwrite,
]
ui_framework: [antd, chakra, mantine, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
run: npm install
- name: Build Examples
id: build_step
run: FRAMEWORK=vite DATA_PROVIDER=${{ matrix.data_provider }} UI_FRAMEWORK=${{ matrix.ui_framework }} node ./.github/workflows/build-template.js
- name: Install Deps
run: |
cd ${{ steps.build_step.outputs.project_path }}
npm install
npm run build
npm run preview -- --port 3000 --host &
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run Cypress on local
uses: cypress-io/github-action@v4
with:
group: vite-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
command: npx cypress run --record
install: false
start: "npm ls"
wait-on: "http://localhost:3000"
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
FRAMEWORK: vite
DATA_PROVIDER: ${{ matrix.data_provider }}
UI_FRAMEWORK: ${{ matrix.ui_framework }}
AUTH_PROVIDER: ${{ steps.build_step.outputs.auth_provider }}
react:
runs-on: ubuntu-latest
name: react
concurrency:
group: ${{ github.ref }}-e2e-local-react-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
data_provider:
[
custom-json-rest,
strapi-v4,
nestjsx-crud,
airtable,
supabase,
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
run: npm install
- name: Build Examples
id: build_step
run: FRAMEWORK=react DATA_PROVIDER=${{ matrix.data_provider }} UI_FRAMEWORK=${{ matrix.ui_framework }} node ./.github/workflows/build-template.js
- name: Install Deps
run: |
cd ${{ steps.build_step.outputs.project_path }}
npm install
npm run build
npm install -g serve
serve -s build &
- name: Run Cypress on local
uses: cypress-io/github-action@v4
with:
group: react-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
command: npx cypress run --record
install: false
start: "npm ls"
wait-on: "http://0.0.0.0:3000"
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
FRAMEWORK: react
DATA_PROVIDER: ${{ matrix.data_provider }}
UI_FRAMEWORK: ${{ matrix.ui_framework }}
AUTH_PROVIDER: ${{ steps.build_step.outputs.auth_provider }}
nextjs:
runs-on: ubuntu-latest
name: nextjs
concurrency:
group: ${{ github.ref }}-e2e-local-nextjs-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
data_provider:
[
custom-json-rest,
strapi-v4,
nestjsx-crud,
airtable,
supabase,
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
run: npm install
- name: Build Examples
id: build_step
run: FRAMEWORK=nextjs DATA_PROVIDER=${{ matrix.data_provider }} UI_FRAMEWORK=${{ matrix.ui_framework }} node ./.github/workflows/build-template.js
- name: Install Deps
run: |
rm -rf .eslintrc .prettierrc
cd ${{ steps.build_step.outputs.project_path }}
npm install
npm run build
npm run start &
- name: Run Cypress on local
uses: cypress-io/github-action@v4
with:
group: nextjs-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
command: npx cypress run --record
install: false
start: "npm ls"
wait-on: "http://0.0.0.0:3000"
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
FRAMEWORK: nextjs
DATA_PROVIDER: ${{ matrix.data_provider }}
UI_FRAMEWORK: ${{ matrix.ui_framework }}
AUTH_PROVIDER: ${{ steps.build_step.outputs.auth_provider }}
remix:
runs-on: ubuntu-latest
name: remix
concurrency:
group: ${{ github.ref }}-e2e-local-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
data_provider:
[
custom-json-rest,
strapi-v4,
nestjsx-crud,
airtable,
supabase,
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
run: npm install
- name: Build Examples
id: build_step
run: FRAMEWORK=remix DATA_PROVIDER=${{ matrix.data_provider }} UI_FRAMEWORK=${{ matrix.ui_framework }} node ./.github/workflows/build-template.js
- name: Install Deps
run: |
cd ${{ steps.build_step.outputs.project_path }}
npm install
npm run build
HOST=0.0.0.0 npm run start &
- name: Run Cypress on local
uses: cypress-io/github-action@v4
with:
group: remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
command: npx cypress run --record
install: false
start: "npm ls"
wait-on: "http://0.0.0.0:3000"
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
FRAMEWORK: remix
DATA_PROVIDER: ${{ matrix.data_provider }}
UI_FRAMEWORK: ${{ matrix.ui_framework }}
AUTH_PROVIDER: ${{ steps.build_step.outputs.auth_provider }}