mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 17:32:35 +00:00
Merge (#127)
This commit is contained in:
19
.github/workflows/code-style.yml
vendored
19
.github/workflows/code-style.yml
vendored
@ -2,9 +2,9 @@ name: code-style
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 1.x
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
code-style:
|
||||
@ -13,7 +13,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [ 8.1 ]
|
||||
php: [8.2]
|
||||
node-version: ["20.x"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -31,9 +32,21 @@ jobs:
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
- name: Run pint
|
||||
run: ./vendor/bin/pint --test
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "20.x"
|
||||
|
||||
- name: Install NPM Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
||||
|
26
.github/workflows/tests.yml
vendored
26
.github/workflows/tests.yml
vendored
@ -2,30 +2,18 @@ name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 1.x
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql
|
||||
env:
|
||||
MYSQL_DATABASE: test_db
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [ 8.1 ]
|
||||
php: [8.2]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -47,10 +35,8 @@ jobs:
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
- name: Create sqlite database
|
||||
run: touch storage/database-test.sqlite
|
||||
|
||||
- name: Run test suite
|
||||
run: php artisan test
|
||||
env:
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_DATABASE: test_db
|
||||
DB_USERNAME: user
|
||||
DB_PASSWORD: password
|
||||
|
Reference in New Issue
Block a user