Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Apr 17, 2021
1 parent fc9d6e9 commit c2715e2
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 33 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/coveralls.yml
@@ -0,0 +1,49 @@
name: coveralls

on:
push:
pull_request:

jobs:
tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os:
- "ubuntu-latest"
php:
- "7.3"
dependencies:
- "locked"
experimental:
- false

name: PHP${{ matrix.php }} on ${{ matrix.os }} (${{ matrix.dependencies }})

steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo
coverage: xdebug

- name: Install dependencies
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"

- name: Execute tests
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
70 changes: 39 additions & 31 deletions .github/workflows/tests.yml
@@ -1,41 +1,49 @@
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
push:
pull_request:
schedule:
- cron: '0 0 * * 3'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3]
os: [ubuntu-latest, windows-latest]
tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
php:
- "7.3"
- "7.4"
- "8.0"
dependencies:
- "locked"
- "highest"
- "lowest"
experimental:
- false

name: PHP${{ matrix.php }} on ${{ matrix.os }}
name: PHP${{ matrix.php }}-${{ matrix.os }} (${{ matrix.dependencies }})

steps:
- name: Checkout code
uses: actions/checkout@v1
steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, fileinfo
coverage: none

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite3, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --no-cache"

- name: Install dependencies
run: |
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
- name: Execute tests
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -21,12 +21,12 @@
}
},
"require": {
"php": ">=7.3",
"php": "^7.3 || ^8.0",
"illuminate/container": "^8.0",
"laravie/parser": "^2.1.2"
},
"require-dev": {
"orchestra/testbench": "^6.0"
"orchestra/testbench": "^6.19"
},
"extra": {
"branch-alias": {
Expand Down

0 comments on commit c2715e2

Please sign in to comment.