Merge pull request #93 from fsr5-fhaachen/feat/presigned-urls-s3 #111
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: CI | |
on: | |
push: | |
branches: ["main", "dev"] | |
pull_request: | |
branches: ["main", "dev"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ["8.0"] | |
node-version: [16.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use PHP ${{ matrix.php-version }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install PHP Dependencies | |
run: composer update --ignore-platform-req=php+ --no-interaction --no-progress | |
- name: Install Node.js Dependencies | |
run: | | |
npm ci --force --legacy-peer-deps | |
- name: Execute build | |
run: npm run build --if-present | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Create Database | |
run: | | |
mkdir -p database | |
touch database/database.sqlite | |
- name: Execute migrations | |
env: | |
DB_CONNECTION: sqlite | |
DB_DATABASE: database/database.sqlite | |
run: | | |
php artisan migrate | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DB_CONNECTION: sqlite | |
DB_DATABASE: database/database.sqlite | |
run: vendor/bin/phpunit |