Create symfony.yml #1
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
# This - name: Setup .NET Core SDK | |
uses: actions/[email protected] | |
with: | |
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx | |
dotnet-version: # optional | |
# Optional quality of the build. The possible values are: daily, signed, validated, preview, ga. | |
dotnet-quality: # optional | |
# Optional global.json location, if your global.json isn't located in the root of the repo. | |
global-json-file: # optional | |
# Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword | |
source-url: # optional | |
# Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository's owner. Only used if a GPR URL is also provided in source-url | |
owner: # optional | |
# Optional NuGet.config location, if your NuGet.config isn't located in the root of the repo. | |
config-file: # optional | |
# Optional input to enable caching of the NuGet global-packages folder | |
cache: # optional | |
# Used to specify the path to a dependency file: packages.lock.json. Supports wildcards or a list of file names for caching multiple dependencies. | |
cache-dependency-path: # optional | |
workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Symfony | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
symfony-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# To automatically get bug fixes and new Php versions for shivammathur/setup-php, | |
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning): | |
# uses: shivammathur/setup-php@v2 | |
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28 | |
with: | |
php-version: '8.0' | |
- uses: actions/checkout@v4 | |
- name: Copy .env.test.local | |
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Create Database | |
run: | | |
mkdir -p data | |
touch data/database.sqlite | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DATABASE_URL: sqlite:///%kernel.project_dir%/data/database.sqlite | |
run: vendor/bin/phpunit |