Skip to content

Commit 05368de

Browse files
authored
Create symfony.yml
1 parent 9b4e736 commit 05368de

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/symfony.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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: [ "master" ]
11+
pull_request:
12+
branches: [ "master" ]
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@v2
25+
with:
26+
php-version: '8.3'
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+
php bin/console --env=test doctrine:database:create
43+
php bin/console --env=test doctrine:schema:create
44+
php bin/console --env=test doctrine:fixtures:load --no-interaction
45+
- name: Execute tests (Unit and Feature tests) via PHPUnit
46+
run: php bin/phpunit

0 commit comments

Comments
 (0)