From 714e43df0c83f509566eb0f34d5030368de6370c Mon Sep 17 00:00:00 2001 From: Nils Weigel Date: Wed, 28 Sep 2022 15:21:52 +0200 Subject: [PATCH] added initial version of github pipeline config --- .github/workflows/php81-test-and-qa.yaml | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/php81-test-and-qa.yaml diff --git a/.github/workflows/php81-test-and-qa.yaml b/.github/workflows/php81-test-and-qa.yaml new file mode 100644 index 0000000..cfd2c45 --- /dev/null +++ b/.github/workflows/php81-test-and-qa.yaml @@ -0,0 +1,47 @@ +name: php81-test-and-qa + +on: + push: + branches: [ "v1" ] + pull_request: + branches: [ "v1" ] + +permissions: + contents: read + +jobs: + symfony-tests: + runs-on: ubuntu-latest + steps: + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + - uses: actions/checkout@v3 + + - name: Copy .env.test.local + run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - 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 --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - name: Execute tests (Unit and Feature tests) via PHPUnit + run: vendor/bin/phpunit + + #- name: Check CS-Fixer + # run: bin/composer fix-cs:check + + + #- name: Check PHPStan + # run: bin/composer phpstan-gitlab