chore: npm upgrade #248
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/CD | |
on: [push] | |
jobs: | |
php: | |
runs-on: ubuntu-latest | |
container: | |
image: airbair/php:ttfl | |
credentials: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
services: | |
mariadb: | |
image: mariadb | |
env: | |
MARIADB_DATABASE: ttfl_test | |
MARIADB_USER: ttfl | |
MARIADB_ROOT_PASSWORD: ttfl | |
MARIADB_PASSWORD: ttfl | |
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=5 | |
env: | |
APP_ENV: test | |
DATABASE_URL: "mysql://ttfl:ttfl@mariadb:3306/ttfl?serverVersion=11.3.2-MariaDB&charset=utf8mb4" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- run: composer install | |
- run: php vendor/bin/php-cs-fixer fix --dry-run --diff | |
- run: php vendor/bin/rector --dry-run | |
- run: php vendor/bin/phpstan analyse --memory-limit=1G | |
- run: php bin/phpunit | |
node: | |
runs-on: ubuntu-latest | |
container: node | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: npm install | |
- run: npm run lint | |
- run: npm run build | |