-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
273 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Unit Tests On Push | ||
|
||
# Controls when the workflow will run | ||
on: push | ||
|
||
# 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: [email protected] | ||
APP_URL: http://localhost | ||
DB_CONNECTION: model | ||
DB_HOST: 127.0.0.1 | ||
DB_PORT: 3306 | ||
DB_DATABASE: api_config | ||
DB_USERNAME: root | ||
DB_PASSWORD: 1qaz2wsx | ||
SS_DB_HOST: 127.0.0.1 | ||
SS_DB_PORT: 3310 | ||
SS_DATABASE: api_model | ||
SS_DB_USERNAME: root | ||
SS_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 | ||
CACHE_DRIVER: redis | ||
SESSION_COOKIE_DOMAIN: localhost | ||
SESSION_COOKIE_SECURE: false | ||
QUEUE_DRIVER: redis | ||
REGISTRATION_DEFAULT_PAYMENT_PROVIDER: Stripe | ||
REGISTRATION_DEFAULT_STRIPE_TEST_MODE: true | ||
REGISTRATION_DEFAULT_LIVE_STRIPE_PRIVATE_KEY: | ||
REGISTRATION_DEFAULT_LIVE_STRIPE_PUBLISHABLE_KEY: | ||
REGISTRATION_DEFAULT_LIVE_WEBHOOK_SECRET: | ||
REGISTRATION_DEFAULT_TEST_STRIPE_PRIVATE_KEY: sk_test_12345 | ||
REGISTRATION_DEFAULT_TEST_STRIPE_PUBLISHABLE_KEY: pk_12345 | ||
REGISTRATION_DEFAULT_TEST_WEBHOOK_SECRET: whsec_12345 | ||
BOOKABLE_ROOMS_DEFAULT_PAYMENT_PROVIDER: Stripe | ||
BOOKABLE_ROOMS_DEFAULT_STRIPE_TEST_MODE: true | ||
BOOKABLE_ROOMS_DEFAULT_LIVE_STRIPE_PRIVATE_KEY: | ||
BOOKABLE_ROOMS_DEFAULT_LIVE_STRIPE_PUBLISHABLE_KEY: | ||
BOOKABLE_ROOMS_DEFAULT_LIVE_WEBHOOK_SECRET: | ||
BOOKABLE_ROOMS_DEFAULT_TEST_STRIPE_PRIVATE_KEY: sk_test_12345 | ||
BOOKABLE_ROOMS_DEFAULT_TEST_STRIPE_PUBLISHABLE_KEY: pk_12345 | ||
BOOKABLE_ROOMS_DEFAULT_TEST_WEBHOOK_SECRET: whsec_12345 | ||
REGISTRATION_VALIDATE_TICKET_TYPE_REMOVAL: false | ||
services: | ||
mysql_api_model: | ||
image: mysql:8.0 | ||
env: | ||
MYSQL_ROOT_PASSWORD: ${{env.SS_DB_PASSWORD}} | ||
MYSQL_DATABASE: ${{env.SS_DATABASE}} | ||
ports: | ||
- 3310:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10 --name=mysql_api_model | ||
mysql_api_config: | ||
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=10 | ||
|
||
steps: | ||
- name: Create Redis | ||
uses: supercharge/[email protected] | ||
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: Change MYSQL sql_mode | ||
run: > | ||
docker exec mysql_api_model mysql -u root --password=${{env.SS_DB_PASSWORD}} -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';" | ||
- name: Install PHP | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: ${{env.PHP_VERSION}} | ||
extensions: pdo_mysql, mbstring, exif, pcntl, bcmath, sockets, gettext | ||
- name: Install dependencies | ||
uses: "ramsey/composer-install@v3" | ||
env: | ||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH_TOKEN }}"} }' | ||
- name: 'Run Tests' | ||
run: | | ||
./update_doctrine.sh | ||
php artisan db:create_test_db --schema=config | ||
php artisan db:create_test_db --schema=model | ||
php artisan doctrine:migrations:migrate --no-interaction --em model | ||
vendor/bin/parallel-lint --blame --exclude .git --exclude vendor . |
File renamed without changes.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.