Skip to content

Commit

Permalink
ci: bump actions, add permissions, add PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Aug 17, 2024
1 parent 027d314 commit 3deb122
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/lint-and-analyse.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
name: Lint and analyse files

permissions:
contents: read

on: [push]

jobs:
lint-php:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use php 7.1
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache module
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.composer/cache/
key: composer-cache
Expand All @@ -26,13 +29,13 @@ jobs:
analyse-php:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use php 7.1
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
- name: Cache module
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.composer/cache/
key: composer-cache
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Run tests

permissions:
contents: read

on: [push]

jobs:
Expand All @@ -8,22 +11,21 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1"]
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
os: [ubuntu-latest]
experimental: [false]
composer-options: ['']
include:
- { php-version: 'nightly', composer-options: '--ignore-platform-req=php', experimental: true, os: ubuntu-latest }
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer:v2
coverage: pcov
- name: Cache module
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.composer/cache/
key: composer-cache
Expand All @@ -32,4 +34,6 @@ jobs:
- name: Run php tests
run: composer run test
- name: Send coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 3deb122

Please sign in to comment.