From 30138ec7db96fa5e2356809ecce228882127e115 Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Wed, 8 May 2024 13:24:01 -0400 Subject: [PATCH] Migrate off Travis CI --- .github/workflows/ci.yml | 55 +++++++++++++++++++++++++++++++++++++ .github/workflows/psalm.yml | 28 +++++++++++++++++++ .travis.yml | 25 ----------------- README.md | 4 ++- 4 files changed, 86 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/psalm.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..eacd069 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +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-28.04'] + php-versions: ['7.0'] + phpunit-versions: ['7.5.20'] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - 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 self-update --1; composer install + + - name: PHPUnit tests + run: vendor/bin/phpunit + + 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.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, intl, sodium + ini-values: error_reporting=-1, display_errors=On + coverage: none + + - name: Install Composer dependencies + uses: "ramsey/composer-install@v3" + + - name: PHPUnit tests + run: vendor/bin/phpunit diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 0000000..e79f6b9 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,28 @@ +name: Psalm + +on: [push] + +jobs: + psalm: + name: Psalm on PHP ${{ matrix.php-versions }} + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['8.3'] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: psalm:4 + coverage: none + + - name: Install Composer dependencies + uses: "ramsey/composer-install@v3" + + - name: Static Analysis + run: psalm diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2420d5b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: php -sudo: false - -matrix: - fast_finish: true - include: - - php: "7.0" - - php: "7.1" - - php: "7.2" - - php: "7.3" - - php: "7.4" - - php: "8.0" - - php: "nightly" - allow_failures: - - php: "8.0" - - php: "nightly" - -install: - # Use Composer v1 on older PHP to side-step dependency issues with Composer 2: - - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer self-update --1; fi - - composer update - -script: - - vendor/bin/phpunit --bootstrap=phpunit-autoload.php - - vendor/bin/psalm diff --git a/README.md b/README.md index 45df0c9..284c486 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # Blakechain -[![Build Status](https://travis-ci.org/paragonie/blakechain.svg?branch=master)](https://travis-ci.org/paragonie/blakechain) +[![Build Status](https://github.com/paragonie/blakechain/actions/workflows/ci.yml/badge.svg)](https://github.com/paragonie/blakechain/actions) +[![Static Analysis](https://github.com/paragonie/blakechain/actions/workflows/psalm.yml/badge.svg)](https://github.com/paragonie/blakechain/actions) [![Latest Stable Version](https://poser.pugx.org/paragonie/blakechain/v/stable)](https://packagist.org/packages/paragonie/blakechain) [![Latest Unstable Version](https://poser.pugx.org/paragonie/blakechain/v/unstable)](https://packagist.org/packages/paragonie/blakechain) [![License](https://poser.pugx.org/paragonie/blakechain/license)](https://packagist.org/packages/paragonie/blakechain) +[![Downloads](https://img.shields.io/packagist/dt/paragonie/blakechain.svg)](https://packagist.org/packages/paragonie/blakechain) Blakechain is a simple hash-chain data structure based on the BLAKE2b hash function.