Skip to content

Commit

Permalink
Create test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseRafn authored Aug 23, 2024
1 parent d287e15 commit 916ab81
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tests

on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]

jobs:
run-tests:
concurrency:
group: tests-${{ github.ref }}-${{ matrix.php-versions }}
cancel-in-progress: true
strategy:
matrix:
php-versions: ['8.0']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, mysql, intl, gd, exif, iconv
coverage: pcov
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-reqs
- name: Execute tests via PHPUnit
run: php -d pcov.enabled=1 -d memory_limit=4G vendor/bin/phpunit --log-junit build/logs/junit-log.xml --coverage-clover=build/logs/clover.xml
- name: Coverage Upload
env:
OTTERWISE_TOKEN: ${{ secrets.OTTERWISE_TOKEN }}
run: bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --log-file build/logs/junit-log.xml


# todo create deploy request in PlanetScale

0 comments on commit 916ab81

Please sign in to comment.