2020-12-31 22:10:24 +00:00
|
|
|
name: e2e
|
2021-07-26 20:59:33 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-10-08 10:19:44 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
2020-12-31 22:10:24 +00:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2021-01-04 09:33:57 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-12-06 17:18:39 +00:00
|
|
|
containers: [ 1, 2 ]
|
2020-12-31 22:10:24 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: 7.4
|
|
|
|
tools: composer:v2
|
2021-03-10 09:18:48 +00:00
|
|
|
extensions: pdo_sqlite
|
2021-01-04 09:33:57 +00:00
|
|
|
- name: Install PHP dependencies
|
2021-03-10 09:18:48 +00:00
|
|
|
uses: ramsey/composer-install@v1
|
2020-12-31 22:10:24 +00:00
|
|
|
with:
|
2021-03-10 09:18:48 +00:00
|
|
|
composer-options: --prefer-dist
|
|
|
|
- name: Generate app key
|
|
|
|
run: php artisan key:generate --quiet
|
2021-12-30 19:09:41 +00:00
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@v2
|
2021-03-10 09:18:48 +00:00
|
|
|
with:
|
2021-12-30 19:09:41 +00:00
|
|
|
node-version: '14'
|
|
|
|
- name: Install JavaScript dependencies
|
|
|
|
run: |
|
|
|
|
cd ./resources/assets && yarn install --no-progress
|
|
|
|
cd ../.. && yarn install --no-progress
|
2021-03-10 09:18:48 +00:00
|
|
|
- name: Lint
|
|
|
|
run: yarn lint
|
2020-12-31 22:10:24 +00:00
|
|
|
- name: Run E2E tests
|
2021-01-04 09:33:57 +00:00
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
with:
|
|
|
|
build: yarn build --no-progress
|
|
|
|
start: php artisan serve --port=8080 --quiet
|
|
|
|
wait-on: 'http://localhost:8080'
|
|
|
|
quiet: true
|
|
|
|
record: true
|
|
|
|
parallel: true
|
|
|
|
env:
|
|
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|