feat: remove monarch build application link (#859) #1794
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: Unit Tests | |
on: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
services: | |
mariadb: | |
image: mariadb:11.0.5 | |
env: | |
MARIADB_DATABASE: testing | |
MARIADB_USER: user | |
MARIADB_PASSWORD: password | |
MARIADB_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd="healthcheck.sh --connect --innodb_initialized" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Install PHP | |
uses: ./.github/actions/tasks/install-php | |
- name: Install Composer dependencies | |
uses: ./.github/actions/tasks/install-composer-deps | |
- name: Prepare .env file | |
run: cp .env.ci .env | |
- name: Install npm dependencies | |
uses: ./.github/actions/tasks/install-npm-deps | |
- name: Calculate front-end asset hash | |
id: get-assets-cache | |
uses: theowenyoung/[email protected] | |
with: | |
path: | | |
resources/js | |
resources/sass | |
public | |
- name: Restore front-end asset cache | |
id: assets-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
resources/js | |
resources/sass | |
public | |
key: ${{ runner.os }}-assets-v1-${{ steps.get-assets-cache.outputs.hash }}-${{ hashFiles('package-lock.json') }} | |
- name: Build front-end assets | |
if: steps.assets-cache.outputs.cache-hit != 'true' | |
run: npm run build | |
- name: Prepare .env file | |
run: | | |
cp .env.example .env | |
echo "DB_HOST=127.0.0.1" >> .env | |
echo "DB_USERNAME=root" >> .env | |
echo "DB_PASSWORD=password" >> .env | |
- name: Prepare Laravel | |
run: | | |
php artisan key:generate | |
chmod -R 755 storage bootstrap/cache | |
- name: Prepare database | |
run: php artisan migrate | |
- name: Run tests | |
env: | |
DB_HOST: 127.0.0.1 | |
MYSQL_USER: root | |
MYSQL_ROOT_PASSWORD: root | |
run: php artisan test |