-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix broken test command #108 - Get php artisan to working - Refactor model relationship * refactor broken relation with Asset Model #108 * Create test suite workflow #108 * fix test suite workflow #108 * add instruction to run test locally #108 * fix lint error #108
- Loading branch information
1 parent
53cb612
commit 4ca2a7a
Showing
10 changed files
with
123 additions
and
17 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,68 @@ | ||
name: Code Test Suite | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: ["8.2"] | ||
|
||
services: | ||
mariadb: | ||
image: mariadb:10.11 | ||
env: | ||
MYSQL_DATABASE: testing_test_company_db | ||
MYSQL_ROOT_PASSWORD: wF9zLp2qRxaS2e | ||
ports: | ||
- 3306:3306 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, dom, fileinfo, mysql | ||
coverage: xdebug | ||
|
||
- name: Install Composer Dependencies | ||
run: | | ||
composer install --no-interaction --prefer-dist | ||
composer dump-autoload | ||
working-directory: ./src/backend | ||
|
||
# - name: Generate key | ||
# run: php artisan key:generate | ||
# working-directory: ./src/backend | ||
|
||
- name: Run Migrations | ||
run: | | ||
php artisan migrate:fresh --seed | ||
working-directory: ./src/backend | ||
env: | ||
DB_CONNECTION: testing | ||
DB_HOST: 127.0.0.1 | ||
DB_PORT: 3306 | ||
DB_DATABASE: testing_test_company_db | ||
DB_USERNAME: root | ||
DB_PASSWORD: wF9zLp2qRxaS2e | ||
|
||
- name: Execute tests | ||
run: php artisan test | ||
working-directory: ./src/backend | ||
continue-on-error: true | ||
env: | ||
DB_CONNECTION: testing | ||
DB_HOST: 127.0.0.1 | ||
DB_PORT: 3306 | ||
DB_DATABASE: testing_test_company_db | ||
DB_USERNAME: root | ||
DB_PASSWORD: wF9zLp2qRxaS2e |
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
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
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
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
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