Skip to content

Commit

Permalink
GitHub Actions - tests without Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 4, 2021
1 parent 61d286d commit 425d060
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 94 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/test.Dockerfile

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/test.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/tests-code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Tests with code coverage

on:
pull_request:
push:
branches:
- master

jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
extensions: mbstring

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Tests"
run: |
php -d 'zend.assertions=1' -d 'pcov.enabled=1' -d 'pcov.directory=src' vendor/bin/phpunit --coverage-clover=.clover.xml
- name: "Upload Codecov Report"
uses: "codecov/codecov-action@v1"
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: .clover.xml
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on:
pull_request:
push:
branches:
- master

jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
php-version:
- "7.1"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mbstring

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Tests"
run: "vendor/bin/phpunit"

0 comments on commit 425d060

Please sign in to comment.