improve error handling for lookup user #569
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: Tests | |
on: [push, pull_request] | |
env: | |
LDAP_PASSWORD: ${{ secrets.LDAP_PASSWORD }} | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- run: cp .env.example .env | |
- name: Setup PHP 8.1 to match server | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
- run: composer install --no-interaction --prefer-dist | |
- name: Build | |
run: docker-compose build | |
- name: Start | |
run: docker-compose up -d | |
- name: Check | |
run: | | |
docker-compose ps --all | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: docker-compose exec -T app ./bin/ci.sh | |
- 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 | |
- run: docker-compose exec -T app chmod -R 777 storage | |
- name: Run integration tests with Pest | |
run: docker-compose exec -T app ./vendor/bin/pest | |
- name: Run unit tests with Jest | |
run: yarn test:unit | |
- name: Run E2E tests with Cypress | |
uses: cypress-io/github-action@v5 | |
with: | |
wait-on: "http://localhost" | |
browser: chrome | |
config: baseUrl=http://localhost | |
- name: Upload test screenshots if any | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: tests/cypress/screenshots | |
- name: Upload snapshots | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-snapshots | |
path: cypress/snapshots |