diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b147d4b..aae8601 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,8 +7,10 @@ on: pull_request: jobs: run: + name: lint (${{ matrix.operating-system }}, ${{ matrix.php-versions }}) runs-on: ${{ matrix.operating-system }} strategy: + fail-fast: false matrix: operating-system: [ 'ubuntu-latest' ] php-versions: [ '7.4' ] @@ -16,13 +18,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Cache vendor - uses: actions/cache@v2 - with: - path: | - vendor - key: vendor-${{ hashFiles('composer.lock') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -30,8 +25,21 @@ jobs: ini-values: post_max_size=256M, max_execution_time=180 tools: composer + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + # see https://github.com/actions/cache + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} + restore-keys: | + composer-${{ runner.os }}-${{ matrix.php-version }}- + composer-${{ runner.os }}- + - name: Populate vendor - run: '[ -e vendor ] || composer install' + run: composer install - name: Lint - run: make lint \ No newline at end of file + run: make lint diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 385755e..bbc9d64 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -7,22 +7,17 @@ on: pull_request: jobs: run: + name: test (${{ matrix.operating-system }}, ${{ matrix.php-versions }}) runs-on: ${{ matrix.operating-system }} strategy: + fail-fast: false matrix: operating-system: [ 'ubuntu-latest' ] - php-versions: [ '5.6', '7.0', '7.1', '7.2', '7.3', '8.0' ] + php-versions: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ] steps: - name: Checkout uses: actions/checkout@v2 - - name: Cache vendor - uses: actions/cache@v2 - with: - path: | - vendor - key: vendor-${{ hashFiles('composer.lock') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -30,8 +25,21 @@ jobs: ini-values: post_max_size=256M, max_execution_time=180 tools: composer + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + # see https://github.com/actions/cache + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} + restore-keys: | + composer-${{ runner.os }}-${{ matrix.php-version }}- + composer-${{ runner.os }}- + - name: Populate vendor - run: '[ -e vendor ] || composer install' + run: composer install - name: Run Tests - run: make deps test \ No newline at end of file + run: make deps test