diff --git a/.gitattributes b/.gitattributes index 13e12625..017837aa 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,6 @@ /.gitattributes export-ignore +/.github/ export-ignore /.gitignore export-ignore -/.travis.yml export-ignore /Doxyfile export-ignore /phpunit.xml export-ignore /tests export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..915d9cd9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +on: + pull_request: + push: + schedule: + - cron: '3 3 * * 1' + +name: CI + +jobs: + unit-tests: + name: Unit tests + + runs-on: ubuntu-20.04 + + strategy: + fail-fast: false + matrix: + php-version: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 + - 7.4 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: composer:v2 + coverage: none + + - name: Cache dependencies installed with composer + uses: actions/cache@v1 + with: + path: ~/.cache/composer + key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + php${{ matrix.php-version }}-composer- + + - name: Install Composer dependencies + run: | + composer update --with-dependencies --no-progress; + composer show; + + - name: Run Tests + run: ./vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fbaa6465..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -php: - - "5.4" - - "5.5" - - "5.6" - - "7.0" - - "7.1" - - "7.2" - - "7.3" - - "7.4" - - hhvm-3.30 -sudo: false -dist: trusty -matrix: - include: - - - php: "5.3" - dist: precise - sudo: false -before_script: rm composer.lock && composer install -script: ./vendor/bin/phpunit --coverage-clover build/coverage/xml -after_script: ./vendor/bin/codacycoverage clover build/coverage/xml diff --git a/README.md b/README.md index 483dd586..21a1aed2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ PHP CSS Parser -------------- -[![build status](https://api.travis-ci.org/sabberworm/PHP-CSS-Parser.svg)](https://travis-ci.org/sabberworm/PHP-CSS-Parser) +[![Build Status](https://github.com/sabberworm/PHP-CSS-Parser/workflows/CI/badge.svg?branch=master)](https://github.com/sabberworm/PHP-CSS-Parser/actions/) A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output as (optimized) CSS.