From 9365045f55a07a066d31063d4526b3d7e5ac65e7 Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Tue, 20 Aug 2019 09:53:26 +0200 Subject: [PATCH] enable github workflows and remove github actions --- .github/workflows/push-integration-test.yml | 25 +++++++++ .github/workflows/push-testing.yml | 57 +++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 .github/workflows/push-integration-test.yml create mode 100644 .github/workflows/push-testing.yml diff --git a/.github/workflows/push-integration-test.yml b/.github/workflows/push-integration-test.yml new file mode 100644 index 0000000..d16dcf0 --- /dev/null +++ b/.github/workflows/push-integration-test.yml @@ -0,0 +1,25 @@ +name: Integration test +on: push +jobs: + integration-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: prepare + uses: docker://bash + with: + entrypoint: sh + args: -l -c "sed -i 's/{GITHUB_SHA}/'\"${GITHUB_SHA}\"'/' ${GITHUB_WORKSPACE}/tests-integration/composer.json" + + - name: composer-install + uses: docker://composer + with: + args: install --working-dir tests-integration + + - name: test + uses: docker://php:7.2 + with: + args: tests-integration/vendor/bin/phpstan analyse --configuration tests-integration/phpstan.neon.dist + --no-progress --error-format=junit src diff --git a/.github/workflows/push-testing.yml b/.github/workflows/push-testing.yml new file mode 100644 index 0000000..ad105f0 --- /dev/null +++ b/.github/workflows/push-testing.yml @@ -0,0 +1,57 @@ +name: Testing +on: push +jobs: + phpunit: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: composer-install + uses: docker://composer + with: + args: install --prefer-source --no-progress + + - name: phpunit + uses: docker://php:7.2 + with: + args: phpdbg -qrr ./vendor/bin/phpunit + + - name: codecoverage + uses: pleo-io/actions/codecov@master + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + args: -f clover-report.xml + + phpstan: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: composer-install + uses: docker://composer + with: + args: install --prefer-source --no-progress + + - name: phpstan + uses: docker://php:7.2 + with: + args: vendor/bin/phpstan analyse + + phpcs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: composer-install + uses: docker://composer + with: + args: install --prefer-source --no-progress + + - name: phpcs + uses: docker://php:7.2 + with: + args: vendor/bin/phpcs