Merge pull request #204 from dbarzin/dev #414
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
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0.21 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: zip, curl, mbstring, dom, ldap, soap, xdebug, mysql, gd | |
- name: Configrue Storage Permission | |
run: mkdir -p bootstrap/cache && chmod -R 777 storage bootstrap/cache | |
- name: Install dependencies | |
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
- name: Create Database | |
run: mysql --host 127.0.0.1 --port 3306 -uroot -e "CREATE DATABASE deming CHARACTER SET utf8 COLLATE utf8_general_ci;" | |
- name: Prepare the application | |
run: php -r "file_exists('.env') || copy('.env.ci', '.env');" | |
- name: Set the application key | |
run: | | |
php artisan key:generate | |
- name: Publish any publishable assets from vendor packages | |
run: | | |
php artisan vendor:publish --all | |
- name: Migrate and seed the database | |
run: | | |
php artisan migrate --seed | |
- name: Seed Attributes | |
run: | | |
php artisan db:seed --class=AttributeSeeder | |
- name: Import framework ISO27001-2002.en | |
run: | | |
php artisan deming:import-framework ./storage/app/repository/ISO27001-2022.en.xlsx --clean | |
- name: Generate Test Data | |
run: | | |
php artisan deming:generate-tests | |
- name: Run Laravel Server | |
run: | | |
php artisan serve --no-reload & |