Skip to content

Commit 5bea82d

Browse files
committed
Merge branch 'structureDB' of github.com:mikhawa/function-php8-2525 into structureDB
2 parents 7bea7bf + 6dfae69 commit 5bea82d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/symfony.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Symfony
7+
8+
on:
9+
push:
10+
branches: [ "structureDB" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
symfony-tests:
19+
runs-on: ubuntu-latest
20+
steps:
21+
# To automatically get bug fixes and new Php versions for shivammathur/setup-php,
22+
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning):
23+
# uses: shivammathur/setup-php@v2
24+
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28
25+
with:
26+
php-version: '8.2'
27+
- uses: actions/checkout@v4
28+
- name: Copy .env.test.local
29+
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');"
30+
- name: Cache Composer packages
31+
id: composer-cache
32+
uses: actions/cache@v3
33+
with:
34+
path: vendor
35+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-php-
38+
- name: Install Dependencies
39+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
40+
- name: Create Database
41+
run: |
42+
mkdir -p data
43+
touch data/database.sqlite
44+
- name: Execute tests (Unit and Feature tests) via PHPUnit
45+
env:
46+
DATABASE_URL: sqlite:///%kernel.project_dir%/data/database.sqlite
47+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)