diff --git a/.gitattributes b/.gitattributes index 7c20117..05f17e3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ /.gitattributes export-ignore /.gitignore export-ignore -/.travis.yml export-ignore /tests export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b04ab32 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,148 @@ +name: CI + +on: [push, pull_request] + +jobs: + roave_bc_check: + name: Roave BC Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: fetch tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Roave BC Check + uses: docker://nyholm/roave-bc-check-ga + phpunit: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + php-version: ['7.4'] + dependencies: ['lowest', 'highest'] + name: 'PHPUnit' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl + coverage: none + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- + - name: Install Dependencies + if: ${{ matrix.dependencies == 'lowest' }} + run: composer update --prefer-lowest --no-progress + - name: Install Dependencies + if: ${{ matrix.dependencies == 'highest' }} + run: composer install --no-progress + - name: PHPUnit + run: vendor/bin/phpunit + env: + BLACKBOX_DETAILED_PROPERTIES: 1 + coverage: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + php-version: ['7.4'] + dependencies: ['lowest', 'highest'] + name: 'Coverage' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl + coverage: xdebug + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- + - name: Install Dependencies + if: ${{ matrix.dependencies == 'lowest' }} + run: composer update --prefer-lowest --no-progress + - name: Install Dependencies + if: ${{ matrix.dependencies == 'highest' }} + run: composer install --no-progress + - name: PHPUnit + run: vendor/bin/phpunit --coverage-clover=coverage.clover + env: + BLACKBOX_SET_SIZE: 1 + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + psalm: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['7.4'] + dependencies: ['lowest', 'highest'] + name: 'Psalm' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- + - name: Install Dependencies + if: ${{ matrix.dependencies == 'lowest' }} + run: composer update --prefer-lowest --no-progress + - name: Install Dependencies + if: ${{ matrix.dependencies == 'highest' }} + run: composer install --no-progress + - name: Psalm + run: vendor/bin/psalm --shepherd + cs: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['7.4'] + name: 'CS' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- + - name: Install Dependencies + run: composer install --no-progress + - name: CS + run: vendor/bin/php-cs-fixer fix --diff --dry-run --diff-format udiff diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b4ef587..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: php -php: - - '7.4snapshot' - - nightly -matrix: - allow_failures: - - php: nightly -before_script: composer install -script: - - vendor/bin/phpunit --coverage-clover=coverage.clover - - vendor/bin/psalm -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index c5e69f0..7429b87 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # ACL -| `develop` | -|-----------| -| [![codecov](https://codecov.io/gh/Innmind/ACL/branch/develop/graph/badge.svg)](https://codecov.io/gh/Innmind/ACL) | -| [![Build Status](https://travis-ci.org/Innmind/ACL.svg?branch=develop)](https://travis-ci.org/Innmind/ACL) | +[![Build Status](https://github.com/innmind/acl/workflows/CI/badge.svg?branch=master)](https://github.com/innmind/acl/actions?query=workflow%3ACI) +[![codecov](https://codecov.io/gh/innmind/acl/branch/develop/graph/badge.svg)](https://codecov.io/gh/innmind/acl) +[![Type Coverage](https://shepherd.dev/github/innmind/acl/coverage.svg)](https://shepherd.dev/github/innmind/acl) Small library to reproduce the logic of the unix filesystem access control list.