Skip to content

feat(auth): add user registration and health check APIs #70

feat(auth): add user registration and health check APIs

feat(auth): add user registration and health check APIs #70

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
jobs:
php:
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping || exit 1"
--health-interval 2s
--health-timeout 3s
--health-retries 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, dom, xml, fileinfo, intl, pdo_sqlite, redis
coverage: none
- name: Composer install
run: composer install --no-interaction --prefer-dist --no-progress
- name: Prepare app (optional)
run: |
cp .env.testing.example .env.testing
php artisan key:generate --env=testing --force
cp .env.testing .env
mkdir -p database
touch database/testing.sqlite
- name: JWT setup
run: |
php artisan vendor:publish --provider="PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider" --force
php artisan jwt:secret --env=testing --force
- name: Lint (Pint)
run: composer lint
- name: Static Analysis (PHPStan)
run: composer stan
- name: Run Migrations
env:
APP_ENV: testing
run: php artisan migrate --env=testing --force
- name: Seed database
env:
APP_ENV: testing
SEED_PROFILE: mini
run: php artisan db:seed --env=testing --force
- name: Test (PHPUnit)
env:
APP_ENV: testing
REDIS_HOST: 127.0.0.1
run:
composer test:parallel
api-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install doc tools
run: npm ci
- name: Validate OpenAPI schema
run: npm run openapi:validate
- name: Lint OpenAPI with Spectral
run: npm run openapi:lint
- name: Check Postman JSON is valid
run: npm run postman:check-json
- name: Check Postman required vars
run: npm run postman:check-vars