203 create a member page #53
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: CI | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
pint: | |
name: PHP - Laravel Pint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo | |
coverage: none | |
- name: Install PHP dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Laravel Pint | |
run: ./vendor/bin/pint | |
- name: Commit changes | |
run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add -A | |
if git diff-index --quiet HEAD; then | |
echo "No changes detected." | |
else | |
git commit -m "feat: 🎨 Laravel Pint by GitHub Actions" | |
git push | |
fi | |
larastan: | |
name: PHP - Larastan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo | |
coverage: none | |
- name: Install PHP dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Prepare the application | |
run: | | |
cp .env.example .env | |
php artisan key:generate | |
- name: Larastan | |
run: ./vendor/bin/phpstan analyse | |
eslint: | |
name: JS - ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Node dependencies | |
run: npm ci | |
- name: ESLint | |
run: npm run lint | |
continue-on-error: true | |
- name: Commit changes | |
run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add -A | |
if git diff-index --quiet HEAD; then | |
echo "No changes detected." | |
else | |
git commit -m "feat: 🎨 ESLint by GitHub Actions" | |
git push | |
fi | |
build: | |
name: JS - Test build assets | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo | |
coverage: none | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install PHP dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Install Node dependencies | |
run: npm ci | |
- name: Prepare the application | |
run: | | |
cp .env.example .env | |
php artisan key:generate | |
- name: Build Node assets | |
run: npm run build | |
unit-tests: | |
name: App - Run tests | |
runs-on: ubuntu-latest | |
env: | |
BROADCAST_DRIVER: log | |
CACHE_DRIVER: redis | |
QUEUE_CONNECTION: redis | |
SESSION_DRIVER: redis | |
DB_CONNECTION: pgsql | |
DB_HOST: localhost | |
DB_PASSWORD: postgres | |
DB_USERNAME: postgres | |
DB_DATABASE: postgres | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432/tcp | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 | |
redis: | |
image: redis | |
ports: | |
- 6379/tcp | |
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Node dependencies | |
run: npm ci | |
- name: Build JS assets | |
run: npm run build | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo | |
coverage: xdebug | |
- name: Install PHP dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Prepare the application | |
run: | | |
cp .env.example .env | |
php artisan key:generate | |
- name: Clear Laravel config | |
run: php artisan config:clear | |
- name: Run migration | |
run: php artisan migrate -v | |
env: | |
DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
REDIS_PORT: ${{ job.services.redis.ports['6379'] }} | |
- name: Run PHP unit test | |
run: php artisan test --coverage | |
env: | |
DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
REDIS_PORT: ${{ job.services.redis.ports['6379'] }} |