diff options
Diffstat (limited to '.github/workflows/codeception_tests.yml')
-rw-r--r-- | .github/workflows/codeception_tests.yml | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/codeception_tests.yml b/.github/workflows/codeception_tests.yml new file mode 100644 index 00000000..5fa7a7d0 --- /dev/null +++ b/.github/workflows/codeception_tests.yml @@ -0,0 +1,73 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +name: "Codeception_Tests" + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop + +env: + MIN_COVERED_MSI: 100 + MIN_MSI: 100 + PHP_EXTENSIONS: "mbstring, pgsql" + key: cache-v1 # can be any string, change to clear the extension cache. +jobs: + tests: + name: "Codeception_Tests" + + runs-on: "ubuntu-latest" + + strategy: + matrix: + php_version: + - "7.3" + + dependencies: + - "locked" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2.3.1" + + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php_version }} + extensions: ${{ env.PHP_EXTENSIONS }} + key: ${{ env.key }} + + - name: Cache extensions + uses: "actions/cache@v2.1.1" + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} + + - name: "Install PHP with extensions" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + extensions: "${{ env.PHP_EXTENSIONS }}" + php-version: "${{ matrix.php_version }}" + tools: composer + + - name: Cache Composer + uses: "actions/cache@v2.1.1" + with: + path: "~/.composer/cache" + key: "composer-${{ hashFiles('composer.lock') }}" + restore-keys: "composer-" + + - name: "Install locked dependencies from composer.lock" + run: "composer install --no-interaction --no-progress --no-suggest" + + - run: cp config.inc.php-dist config.inc.php + - name: "Run vendor/bin/codecept" + run: "vendor/bin/codecept run unit" |