-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Test Suite | ||
|
||
on: | ||
# Controls when the action will be triggered. | ||
push: # A push to any branch. | ||
pull_request: # A pull request to the main/master branch. | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "test" | ||
php-tests: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-versions: [ '7.4', '8.0', '8.1' ] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
name: Run tests @ PHP ${{ matrix.php-versions }} | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
# extensions: json | ||
# ini-values: "post_max_size=256M" #optional | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Run TEST suite | ||
run: composer run-script test:ci -- -C | ||
|
||
# Note to future dev: | ||
# We don't need "lowest dependencies" because there are none. | ||
# I gave up on Coveralls since I have no idea how to set it up. Pity. | ||
# | ||
# lowest-deps: | ||
# name: Lowest dependencies | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: shivammathur/setup-php@v2 | ||
# with: | ||
# php-version: 7.4 | ||
# coverage: none | ||
# - run: composer update --prefer-dist --no-progress --prefer-lowest --prefer-stable | ||
# - name: Run TEST suite | ||
# run: composer run-script test:ci -- -C | ||
# | ||
# | ||
# coverage: | ||
# name: Coverage report | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: shivammathur/setup-php@v2 | ||
# with: | ||
# php-version: 8.0 | ||
# coverage: none | ||
# - name: Install dependencies | ||
# run: composer install --prefer-dist --no-progress | ||
# - name: Generate coverage report | ||
# run: composer run-script test:ci -- -C -p phpdbg --coverage tests/output/clover.xml --coverage-src src | ||
# | ||
# # https://github.com/php-coveralls/php-coveralls/#github-actions | ||
# - name: Upload coverage report to Coveralls | ||
# env: | ||
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: | | ||
# composer global require php-coveralls/php-coveralls | ||
# php-coveralls --coverage_clover=tests/output/clover.xml -v --json_path=tests/output/ | ||
# |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters