diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..da71570dce3c8dc917e9884bd662e6c984cb6344 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,101 @@ +name: CI + +on: [push] + +jobs: + old: + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-16.04'] + php-versions: ['7.0'] + phpunit-versions: ['6.5.14'] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, intl + ini-values: post_max_size=256M, max_execution_time=180 + tools: psalm, phpunit:${{ matrix.phpunit-versions }} + + - name: Install dependencies + run: composer self-update --1; composer install + + - name: PHPUnit tests + uses: php-actions/phpunit@v2 + with: + memory_limit: 256M + + - name: Static Analysis + run: vendor/bin/psalm + + moderate: + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['7.1', '7.2', '7.3'] + phpunit-versions: ['latest'] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, intl, sodium + ini-values: post_max_size=256M, max_execution_time=180 + tools: psalm, phpunit:${{ matrix.phpunit-versions }} + + - name: Install dependencies + run: composer install + + - name: Modernize dependencies + run: composer require --dev "phpunit/phpunit:>=4" + + - name: PHPUnit tests + uses: php-actions/phpunit@v2 + timeout-minutes: 30 + with: + memory_limit: 256M + + - name: Static Analysis + run: vendor/bin/psalm + + modern: + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['7.4', '8.0'] + phpunit-versions: ['latest'] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, intl, sodium + ini-values: post_max_size=256M, max_execution_time=180 + tools: psalm, phpunit:${{ matrix.phpunit-versions }} + + - name: Install dependencies + run: composer install + - name: PHPUnit tests + uses: php-actions/phpunit@v2 + timeout-minutes: 30 + with: + memory_limit: 256M + + - name: Static Analysis + run: vendor/bin/psalm diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 117c114a1c38b971711f91ce5205085a89f91871..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php -sudo: false - -matrix: - fast_finish: true - include: - - php: "7.1" - - php: "7.2" - - php: "7.3" - - php: "7.4" - - php: "8.0" - - php: "nightly" - allow_failures: - - php: "nightly" - - php: "7.4" - - php: "8.0" - -install: - - composer self-update - - composer update - -script: - - vendor/bin/phpunit - - vendor/bin/psalm diff --git a/README.md b/README.md index d7db2a2d071f470c4e8f21fa460ec4520499a236..d39cc66e01cd01401aa01b4c29aba79fdc66d480 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Constant-Time Encoding -[](https://travis-ci.org/paragonie/constant_time_encoding) +[](https://github.com/paragonie/constant_time_encoding/actions) [](https://packagist.org/packages/paragonie/constant_time_encoding) [](https://packagist.org/packages/paragonie/constant_time_encoding) [](https://packagist.org/packages/paragonie/constant_time_encoding) diff --git a/psalm.xml b/psalm.xml index 0a17264b0547ca22d98033927c4e67be0a8dbad8..dade79a2c201ce89448f890016dae2bfa82f9e06 100644 --- a/psalm.xml +++ b/psalm.xml @@ -6,4 +6,7 @@ <projectFiles> <directory name="src" /> </projectFiles> + <issueHandlers> + <UnnecessaryVarAnnotation errorLevel="info" /> + </issueHandlers> </psalm>