Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Format tests
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Jun 3, 2021
commit 9e68804049d824b5664e985a5e37dc2646f17627
12 changes: 10 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,60 @@ on: pull_request

jobs:
php-linters:
name: php${{ matrix.php-versions }} lint
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0']
name: php${{ matrix.php-versions }} lint

steps:
- name: Checkout
uses: actions/checkout@master

- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Lint
run: composer run lint

php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: 7.4
extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
tools: cs2pr

- name: Install dependencies
run: composer i

- name: Run coding standards check
run: |
composer run cs:check -- --format=checkstyle | cs2pr
composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
shell: bash

node:
name: eslint node${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

name: eslint node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@ env:
jobs:
phpunit-nodb:
runs-on: ubuntu-20.04

strategy:
matrix:
php-versions: [ '7.3', '7.4', '8.0' ]
php-versions: ["7.3", "7.4", "8.0"]

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
tools: phpunit:9.5.4
coverage: none

- name: PHPUnit
env:
NOCOVERAGE: true
Expand All @@ -47,36 +51,38 @@ jobs:

phpunit-sqlite:
runs-on: ubuntu-20.04

strategy:
matrix:
php-versions: [ '7.3', '7.4', '8.0' ]
php-versions: ["7.3", "7.4", "8.0"]

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
tools: phpunit:9.5.4
coverage: none

- name: PHPUnit
env:
NOCOVERAGE: true
run: bash autotest.sh sqlite

phpunit-oci8:
runs-on: ubuntu-20.04
needs: phpunit-sqlite
# oci takes more time
needs: [phpunit-nodb, phpunit-sqlite]

strategy:
matrix:
php-versions: [ '7.4' ]
databases: [ 'oci' ]

name: php${{ matrix.php-versions }}-${{ matrix.databases }}
php-versions: ["7.4"]

services:
oracle:
Expand Down