docs: update README.md #1236
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
jobs: | |
dotenv_lint: | |
name: Dotenv Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run dotenv-linter | |
uses: dotenv-linter/action-dotenv-linter@v2 | |
with: | |
github_token: ${{ secrets.github_token }} | |
dotenv_linter_flags: --skip UnorderedKey | |
markdown_lint: | |
name: Markdown Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run markdownlint | |
uses: docker://avtodev/markdown-lint:v1 | |
with: | |
args: './README.md' | |
phpcs: | |
name: PHPCS | |
runs-on: ubuntu-latest | |
container: | |
image: baijunyao/php:8.1-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
- name: PHP CS Fixer | |
run: | | |
./vendor/bin/php-cs-fixer fix --verbose --show-progress=dots --dry-run --diff | |
phpstan: | |
name: PHPStan | |
runs-on: ubuntu-latest | |
container: | |
image: baijunyao/php:8.1-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
- name: PHPStan | |
run: | | |
./vendor/bin/phpstan analyse --ansi | |
helm_lint: | |
name: Helm Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run Helm lint | |
run: | | |
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null | |
sudo apt-get install apt-transport-https --yes | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list | |
sudo apt-get update | |
sudo apt-get install helm | |
cd deploy/helm | |
helm lint | |
ansible_lint: | |
name: Ansible Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run Ansible lint | |
run: | | |
pip3 install ansible | |
pip3 install ansible-lint | |
GITHUB_ACTIONS=true; ansible-lint -p deploy/ansible | |
php_8_0_mysql_5_6: | |
name: PHP8.0+MySQL5.6 | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.6 | |
env: | |
MYSQL_ROOT_PASSWORD: laravel_bjyblog | |
MYSQL_DATABASE: laravel_bjyblog | |
container: | |
image: baijunyao/php:8.0-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
php artisan key:generate | |
php artisan passport:keys | |
php artisan migrate | |
php artisan db:seed | |
php artisan storage:link --relative | |
- name: Test | |
run: | | |
composer test | |
php_8_0_mysql_5_7: | |
name: PHP8.0+MySQL5.7 | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: laravel_bjyblog | |
MYSQL_DATABASE: laravel_bjyblog | |
container: | |
image: baijunyao/php:8.0-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
php artisan key:generate | |
php artisan passport:keys | |
php artisan migrate | |
php artisan db:seed | |
php artisan storage:link --relative | |
- name: Test | |
run: | | |
composer test | |
php_8_0_mysql_8_0: | |
name: PHP8.0+MySQL8.0 | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: baijunyao/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: laravel_bjyblog | |
MYSQL_DATABASE: laravel_bjyblog | |
container: | |
image: baijunyao/php:8.0-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
php artisan key:generate | |
php artisan passport:keys | |
php artisan migrate | |
php artisan db:seed | |
php artisan storage:link --relative | |
- name: Test | |
run: | | |
composer test:coverage-xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
files: storage/framework/testing/coverage.xml | |
php_8_1_mysql_5_6: | |
name: PHP8.1+MySQL5.6 | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.6 | |
env: | |
MYSQL_ROOT_PASSWORD: laravel_bjyblog | |
MYSQL_DATABASE: laravel_bjyblog | |
container: | |
image: baijunyao/php:8.1-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
php artisan key:generate | |
php artisan passport:keys | |
php artisan migrate | |
php artisan db:seed | |
php artisan storage:link --relative | |
- name: Test | |
run: | | |
composer test | |
php_8_1_mysql_5_7: | |
name: PHP8.1+MySQL5.7 | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: laravel_bjyblog | |
MYSQL_DATABASE: laravel_bjyblog | |
container: | |
image: baijunyao/php:8.1-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
php artisan key:generate | |
php artisan passport:keys | |
php artisan migrate | |
php artisan db:seed | |
php artisan storage:link --relative | |
- name: Test | |
run: | | |
composer test | |
php_8_1_mysql_8_0: | |
name: PHP8.1+MySQL8.0 | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: baijunyao/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: laravel_bjyblog | |
MYSQL_DATABASE: laravel_bjyblog | |
container: | |
image: baijunyao/php:8.1-local | |
volumes: | |
- /__w/laravel-bjyblog/laravel-bjyblog:/app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Initial | |
run: | | |
cp .env.actions .env | |
composer install | |
php artisan key:generate | |
php artisan passport:keys | |
php artisan migrate | |
php artisan db:seed | |
php artisan storage:link --relative | |
- name: Test | |
run: | | |
composer test:coverage-xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
files: storage/framework/testing/coverage.xml | |
notify: | |
name: Slack Notify | |
runs-on: ubuntu-latest | |
needs: [dotenv_lint, markdown_lint, helm_lint, ansible_lint, phpcs, phpstan, php_8_0_mysql_5_6, php_8_0_mysql_5_7, php_8_0_mysql_8_0, php_8_1_mysql_5_6, php_8_1_mysql_5_7, php_8_1_mysql_8_0] | |
if: always() | |
steps: | |
- name: Slack Notify | |
uses: baijunyao/action-slack-notify@v3.0.0 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
slack_channel_id: CEWJP77BP | |
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }} | |
github_context: ${{ toJson(github) }} |