Skip to content

Commit

Permalink
Update Gihub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
noresources committed Nov 22, 2023
1 parent 3b44394 commit ca2af36
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests
name: PHP Composer and PHPUnit tests
on:
push:
branches:
Expand All @@ -9,19 +9,15 @@ on:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
tests:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
run: composer validate
- name: Update packages
run: sudo apt-get update -y --quiet
- name: Install packages
run: sudo apt-get install -y --quiet ksh zsh clang xsltproc libxml2-utils
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
Expand All @@ -31,5 +27,13 @@ jobs:
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
- name: Run PHPUnit tests
run: composer run-script test
- name: Run test scripts
run: make tests
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- ubuntu-20.04
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"phpunit/phpunit": ">=7.0"
},
"scripts": {
"tests": "make tests",
"phpunit": "./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/php/"
"test": "./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/php/"
}
}
}

0 comments on commit ca2af36

Please sign in to comment.