Skip to content

continuous_integration #220

continuous_integration

continuous_integration #220

name: continuous_integration
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * 5"
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
continuous_integration:
runs-on: ubuntu-latest
strategy:
matrix:
php: ["8.1", "8.2", "8.3"]
fail-fast: false
name: Make sure that the WPGraphQLTestCase works!!!
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring
- name: Install Dependencies
run: composer install
- name: Run Codeception Tests w/ Docker.
run: composer run-codeception -- -- --coverage --coverage-xml
- name: Run PHPUnit Tests w/ Docker.
run: composer run-phpunit -- -- --coverage-text
- name: Push Codecoverage to Coveralls.io
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
docker-compose run --rm \
--workdir=/var/www/html/wp-content/plugins/wp-graphql-testcase \
--user $(id -u) \
-e COVERALLS_RUN_LOCALLY=1 -e COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN \
wordpress \
vendor/bin/php-coveralls -v