-
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
1 parent
8eae5e9
commit d925383
Showing
17 changed files
with
3,260 additions
and
737 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,12 @@ | ||
APP_NAME="App in testing" | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=false | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=mysql | ||
DB_PORT=3306 | ||
DB_DATABASE=app_db | ||
DB_USERNAME=app_user | ||
DB_PASSWORD=secret |
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 |
---|---|---|
|
@@ -19,3 +19,4 @@ yarn-error.log | |
/.idea | ||
/.vscode | ||
/.zed | ||
/.php-cs-fixer.cache |
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,90 @@ | ||
default: | ||
workspace: shared | ||
|
||
stages: | ||
- build | ||
- check | ||
|
||
jobs: | ||
- name: Build Laravel | ||
stage: build | ||
image: ghcr.io/avengerscodelovers/php:8.2-ci | ||
services: | ||
- image: mysql:8.0 | ||
name: mysql | ||
environment: | ||
MYSQL_DATABASE: app_db | ||
MYSQL_USER: app_user | ||
MYSQL_PASSWORD: secret | ||
MYSQL_ROOT_PASSWORD: root | ||
environment: | ||
APP_ENV: testing | ||
COMPOSER_MEMORY_LIMIT: 2G | ||
COMPOSER_ALLOW_SUPERUSER: "1" | ||
cache: | ||
- key: composer_vendor_$CI_BRANCH | ||
paths: | ||
- vendor | ||
script: | ||
- cp .env.testing.example .env | ||
- composer install | ||
- php artisan key:generate | ||
- php artisan migrate | ||
- php artisan route:cache | ||
|
||
# - name: Check GKC Hashcode | ||
# stage: check | ||
# image: bash:latest | ||
# workspace: false | ||
# before_script: | ||
# # For command tput, used by gkc_util_hashcode_script.sh | ||
# - apk add ncurses | ||
# environment: | ||
# TERM: xterm | ||
# script: | ||
# - bash ./gkc_util_hashcode_script.sh | ||
# only: | ||
# events: | ||
# - pull_request | ||
|
||
- name: Static Code Analysis | ||
stage: check | ||
image: ghcr.io/avengerscodelovers/php:8.2-ci | ||
environment: | ||
COMPOSER_MEMORY_LIMIT: 2G | ||
COMPOSER_ALLOW_SUPERUSER: "1" | ||
script: | ||
- COMPOSER_PROCESS_TIMEOUT=600 composer phpstan | ||
|
||
- name: PHP Coding Convention | ||
stage: check | ||
image: ghcr.io/avengerscodelovers/php:8.2-ci | ||
environment: | ||
COMPOSER_MEMORY_LIMIT: 2G | ||
COMPOSER_ALLOW_SUPERUSER: "1" | ||
script: | ||
- composer cs | ||
|
||
- name: PHP Test Coverage and Codecov | ||
stage: check | ||
image: ghcr.io/avengerscodelovers/php:8.2-ci | ||
services: | ||
- image: mysql:8.0 | ||
name: mysql | ||
environment: | ||
MYSQL_DATABASE: app_db | ||
MYSQL_USER: app_user | ||
MYSQL_PASSWORD: secret | ||
MYSQL_ROOT_PASSWORD: root | ||
environment: | ||
COMPOSER_ALLOW_SUPERUSER: "1" | ||
script: | ||
- php artisan migrate | ||
- XDEBUG_MODE=coverage php -dzend_extension=xdebug.so ./vendor/bin/pest --coverage-clover ./coverage.xml --ci | ||
# Upload code coverage report to Sun* Codecov | ||
# Container must be installed git, that used to detect Git commit SHA for Codecov | ||
- apk add curl git | ||
- curl -Os https://cli.codecov.io/latest/alpine/codecov | ||
- chmod +x codecov | ||
- if [ -z $CI_PR_NUMBER ]; then export CODECOV_PR=""; else export CODECOV_PR="--pull-request-number $CI_PR_NUMBER"; fi | ||
- ./codecov --verbose --enterprise-url https://athena.sun-asterisk.vn upload-process --fail-on-error --token $CODECOV_TOKEN --branch $CI_BRANCH $CODECOV_PR --name 'Sun*CI' --flag phpunit --file ./coverage.xml --build-url https://ci.sun-asterisk.com/$CI_GIT_PROVIDER/$CI_REPOSITORY/builds/$CI_BUILD_NUMBER --plugin noop --report-type coverage |
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
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
Oops, something went wrong.