diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..553a4a0 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,49 @@ +name: coveralls + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + php: + - "7.3" + dependencies: + - "locked" + experimental: + - false + + name: PHP${{ matrix.php }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo + coverage: xdebug + + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist" + + - name: Execute tests + run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml + + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d86c3c..848d412 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,41 +1,49 @@ name: tests on: - push: - pull_request: - schedule: - - cron: '0 0 * * *' + push: + pull_request: + schedule: + - cron: '0 0 * * 3' jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - php: [7.4, 7.3] - os: [ubuntu-latest, windows-latest] + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + - "windows-latest" + php: + - "7.3" + - "7.4" + - "8.0" + dependencies: + - "locked" + - "highest" + - "lowest" + experimental: + - false - name: PHP${{ matrix.php }} on ${{ matrix.os }} + name: PHP${{ matrix.php }}-${{ matrix.os }} (${{ matrix.dependencies }}) - steps: - - name: Checkout code - uses: actions/checkout@v1 + steps: + - name: Checkout code + uses: actions/checkout@v1 - - name: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, fileinfo + coverage: none - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite3, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" - - name: Install dependencies - run: | - composer update --prefer-stable --prefer-dist --no-interaction --no-suggest - - name: Execute tests - run: vendor/bin/phpunit + - name: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 316ebbe..1461a0e 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,12 @@ } }, "require": { - "php": ">=7.3", + "php": "^7.3 || ^8.0", "illuminate/container": "^8.0", "laravie/parser": "^2.1.2" }, "require-dev": { - "orchestra/testbench": "^6.0" + "orchestra/testbench": "^6.19" }, "extra": { "branch-alias": {