feat: make otp numeric only #343
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
| # This is a basic workflow to help you get started with Actions | |
| name: Unit Tests On Pull Request | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on pull request events but only for the "main" branch | |
| pull_request: | |
| types: [opened, reopened, edited,synchronize] | |
| branches: [ "main" ] | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "unit-tests" | |
| unit-tests: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| env: | |
| APP_ENV: testing | |
| APP_DEBUG: true | |
| APP_KEY: base64:4vh0op/S1dAsXKQ2bbdCfWRyCI9r8NNIdPXyZWt9PX4= | |
| DEV_EMAIL_TO: smarcet@gmail.com | |
| APP_URL: http://localhost | |
| DB_CONNECTION: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: idp_test | |
| DB_USERNAME: root | |
| DB_PASSWORD: 1qaz2wsx | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: 6379 | |
| REDIS_DB: 0 | |
| REDIS_PASSWORD: 1qaz2wsx | |
| REDIS_DATABASES: 16 | |
| SSL_ENABLED: false | |
| SESSION_DRIVER: redis | |
| PHP_VERSION: 8.3 | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: ${{env.DB_PASSWORD}} | |
| MYSQL_DATABASE: ${{env.DB_DATABASE}} | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - name: Create Redis | |
| uses: supercharge/redis-github-action@1.7.0 | |
| with: | |
| redis-port: ${{env.REDIS_PORT}} | |
| redis-password: ${{env.REDIS_PASSWORD}} | |
| # Downloads a copy of the code in your repository before running CI tests | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Install PHP | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: ${{env.PHP_VERSION}} | |
| extensions: pdo_mysql, mbstring, exif, pcntl, bcmath, sockets, gettext, apcu | |
| - name: Install dependencies | |
| uses: "ramsey/composer-install@v3" | |
| env: | |
| COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.PAT }}"} }' | |
| - name: 'Run Tests' | |
| run: | | |
| ./update_doctrine.sh | |
| php artisan doctrine:migrations:migrate --no-interaction | |
| php artisan db:seed --force | |
| vendor/bin/phpunit --log-junit results.xml | |
| - name: 'Upload Unit Test Output' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output | |
| path: /output.log | |
| retention-days: 5 |