Merge branch 'ecossistema-aurora-main' #2028
This file contains hidden or 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: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| php-unit: | |
| name: Run PHPUnit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create .env file | |
| run: cp .env.example .env | |
| - name: Start the aurora | |
| run: docker compose up -d --build | |
| - name: Install dependencies | |
| run: docker compose exec --user root php composer install --ignore-platform-req=ext-mongodb | |
| - name: Generate public/private keys for use in your application. | |
| run: docker compose exec --user root php bin/console lexik:jwt:generate-keypair | |
| - name: Give permissions for var | |
| run: sudo chmod -R 777 var/ | |
| - name: Create assets/uploads directory and give permissions | |
| run: mkdir -p assets/uploads && chmod -R 777 assets/uploads | |
| - name: Create the phpunit.xml | |
| run: docker compose exec --user root php cp phpunit.xml.dist phpunit.xml | |
| - name: Run migrations | |
| run: docker compose exec php bin/console d:m:migrate -n | |
| - name: Run fixtures | |
| run: docker compose exec php bin/console d:f:l -n --purge-exclusions=city --purge-exclusions=state | |
| - name: Start the PHPUnit | |
| run: docker compose exec --user root php bin/paratest | |
| - name: Check coverage | |
| run: docker compose exec --user root php bin/console app:check-coverage | |
| - name: Remove o .env file | |
| run: rm .env | |
| cypress: | |
| name: Run Cypress | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create .env file | |
| run: cp .env.example .env | |
| - name: Start the aurora | |
| run: docker compose up -d --build | |
| - name: Install application dependencies | |
| run: docker compose exec --user root php composer install --ignore-platform-req=ext-mongodb | |
| - name: Generate public/private keys for use in your application. | |
| run: docker compose exec --user root php bin/console lexik:jwt:generate-keypair | |
| - name: Give permissions for var | |
| run: sudo chmod -R 777 var/ | |
| - name: Create storage and give permissions | |
| run: mkdir storage && chmod -R 777 storage | |
| - name: Run generate mongodb proxies | |
| run: docker compose exec --user root php bin/console doctrine:mongodb:generate:proxie | |
| - name: Run migrations | |
| run: docker compose exec --user root php bin/console d:m:migrate -n | |
| - name: Create folder assets/uploads | |
| run: docker compose exec --user root php mkdir assets/uploads | |
| - name: Give permissions for assets/uploads | |
| run: docker compose exec --user root php chmod -R 777 assets/uploads | |
| - name: Run fixtures | |
| run: docker compose exec php bin/console d:f:l -n --purge-exclusions=city --purge-exclusions=state | |
| - name: Install frontend dependencies | |
| run: docker compose exec --user root php bin/console importmap:install | |
| - name: Compile frontend dependencies | |
| run: docker compose exec --user root php bin/console asset-map:compile | |
| - name: Run cypress | |
| run: export CYPRESS_USER=root && docker compose run --rm cypress | |
| - name: Upload Cypress screenshots | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cypress-screenshots | |
| path: ./cypress/screenshots | |
| - name: Remove o .env file | |
| run: rm .env |