Skip to content

Merge branch 'develop' of https://github.com/UMN-LATIS/ChimeIn2.0 int… #2805

Merge branch 'develop' of https://github.com/UMN-LATIS/ChimeIn2.0 int…

Merge branch 'develop' of https://github.com/UMN-LATIS/ChimeIn2.0 int… #2805

Workflow file for this run

name: Tests
on: [push]
env:
WWWGROUP: 1000
WWWUSER: 1000
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.1"]
node-version: ["20"]
name: PHP ${{ matrix.php-version }} + Node ${{ matrix.node-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- run: cp .env.example .env
- name: Setup PHP 8.1 to match server
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: composer install --no-interaction --prefer-dist --ignore-platform-reqs
- name: Build
run: docker-compose build
- name: Start
run: docker-compose up -d
- name: Check
run: |
docker-compose ps --all
- run: docker-compose exec -T app ./bin/ci.sh
- run: npm ci
- run: npm run build
- run: docker-compose exec -T app php artisan key:generate
- run: docker-compose exec -T app php artisan migrate:fresh
- run: docker-compose exec -T app php artisan db:seed
- name: Lint code
run: docker-compose exec -T app npm run lint
- name: Run unit tests with Jest
run: docker-compose exec -T app npm run test:unit
- name: Run E2E tests with Cypress
uses: cypress-io/github-action@v6
with:
wait-on: "http://localhost"
browser: chrome
config: baseUrl=http://localhost
- name: Upload test screenshots if any
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload snapshots
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-snapshots
path: cypress/snapshots
- name: Execute Unit tests via PHPUnit
run: docker-compose exec -T app php artisan test