build(deps): Bump league/commonmark from 2.4.0 to 2.6.0 #2245
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: Test | |
on: | |
push: | |
branches: | |
- "*" | |
- "**" | |
tags-ignore: | |
- v* | |
pull_request: | |
jobs: | |
test: | |
name: PHP | |
runs-on: ubuntu-latest | |
concurrency: | |
group: nexus-test-${{ github.ref }} | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
php: ["8.1"] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
# | |
# ENVIRONMENT DEPENDENCIES SETUP | |
# | |
- name: Configure PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Setup Yarn | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "12" | |
# Start MySQL and Create Databases | |
- name: Create Databases | |
run: | | |
sudo systemctl start mysql.service | |
mysql -e 'CREATE DATABASE IF NOT EXISTS nexus;' -h127.0.0.1 -uroot -proot | |
# | |
# COMPOSER DEPENDENICES | |
# | |
# Add Github Auth to Composer | |
- name: Add Composer GitHub Token | |
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | |
# Restore Caches | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Restore Composer Cache | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Restore Vendor From Cache | |
uses: actions/cache@v1 | |
with: | |
path: vendor | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} | |
# Install | |
- name: Install Composer Dependencies | |
run: composer install --prefer-dist --no-interaction --optimize-autoloader --no-suggest | |
# | |
# YARN DEPENDENCIES | |
# | |
# Restore Caches | |
- name: Get Yarn Cache Directory | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore Yarn Cache | |
uses: actions/cache@v1 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install | |
- name: Install assets | |
run: yarn | |
- name: Compile assets | |
run: yarn run prod | |
- name: Set Environment Variables | |
uses: allenevans/[email protected] | |
with: | |
APP_ENV: testing | |
APP_KEY: base64:wx/g4ayECKlSzOYSguRFoCrsd+KSbAyEiy0J8zWxxyU= | |
APP_URL: http://127.0.0.1 | |
CACHE_DRIVER: array | |
DB_HOST: localhost | |
DB_PORT: 3306 | |
DB_USERNAME: root | |
DB_PASSWORD: root | |
DB_DATABASE: nexus | |
# Run Database Migration | |
- name: Migrate Database | |
run: php artisan migrate | |
# Cache Setup | |
- name: Cache Routes | |
run: php artisan route:cache | |
- name: Clear Config Cache | |
run: php artisan config:clear | |
# Start Application | |
- name: Serve Application | |
run: php artisan serve -q & | |
# Run Tests | |
- name: Execute Tests | |
run: php artisan test | |
trigger-deploy: | |
name: Trigger Deployment | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
# | |
# DEPLOY (main only) | |
# | |
- name: Trigger Deploy workflow | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.PAT }} | |
event-type: deploy-trigger |