ci: use run script
This commit is contained in:
parent
21aa911fb4
commit
43a7205c85
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
@ -7,23 +7,7 @@ jobs:
|
|||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['7.4']
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Configure PHP ${{ matrix.php-version }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: >
|
||||
composer install --no-progress --no-suggest --prefer-dist \
|
||||
--optimize-autoloader
|
||||
|
||||
- name: Run PHPCS
|
||||
run: make phpcs
|
||||
- run: ./run ci:test
|
||||
|
|
7
run
7
run
|
@ -10,6 +10,11 @@ function build {
|
|||
docker image build . --tag ${DOCKER_TAG}
|
||||
}
|
||||
|
||||
function ci:test {
|
||||
build
|
||||
test "${@}"
|
||||
}
|
||||
|
||||
function help {
|
||||
printf "%s <task> [args]\n\nTasks:\n" "${0}"
|
||||
|
||||
|
@ -20,7 +25,7 @@ function help {
|
|||
|
||||
function test {
|
||||
# Run PHPUnit tests.
|
||||
docker container run --rm -it \
|
||||
docker container run --rm -t \
|
||||
-v $(pwd):/app \
|
||||
--entrypoint phpunit \
|
||||
${DOCKER_TAG} "${@}"
|
||||
|
|
Loading…
Reference in a new issue