Skip to content

Commit

Permalink
run tests using GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jul 15, 2024
1 parent 54f1ffc commit f217586
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 29 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
- push
- pull_request

jobs:
phpunit:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- php: '7.1'
composer: '2.2'
- php: '7.2'
composer: '2.2'
- php: '7.3'
composer: latest
- php: '7.4'
composer: latest
- php: '8.0'
composer: latest
- php: '8.1'
composer: latest
- php: '8.2'
composer: latest
- php: '8.3'
composer: latest
- php: '8.4'
composer: latest

steps:
- name: Checkout the source code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'

- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: '${{ matrix.php }}'
version: '${{ matrix.composer }}'

- name: Run tests
run: |
vendor/bin/phpunit
vendor/bin/phpunit test/CommonMarkTestWeak.php || true
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion test/CommonMarkTestStrict.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php

use PHPUnit\Framework\TestCase;

/**
* Test Parsedown against the CommonMark spec
*
* @link http://commonmark.org/ CommonMark
*/
class CommonMarkTestStrict extends PHPUnit_Framework_TestCase
class CommonMarkTestStrict extends TestCase
{
const SPEC_URL = 'https://raw.githubusercontent.com/jgm/CommonMark/master/spec.txt';

Expand Down

0 comments on commit f217586

Please sign in to comment.