diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d623e5..2fd0876 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/run b/run index 21f86d5..0f7d662 100755 --- a/run +++ b/run @@ -10,6 +10,11 @@ function build { docker image build . --tag ${DOCKER_TAG} } +function ci:test { + build + test "${@}" +} + function help { printf "%s [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} "${@}"