Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
robbinjanssen committed Nov 13, 2023
1 parent b8d3f34 commit 49b20e5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,50 @@ on:

jobs:
run-tests:
name: 🪲 Run tests
name: Run tests
runs-on: ubuntu-latest

strategy:
matrix:
php: ["7.3", "7.4", "8.0"]
versions: [
{ php: "7.3", phpunit: "9" },
{ php: "7.4", phpunit: "9" },
{ php: "8.0", phpunit: "9" },
{ php: "8.1", phpunit: "10" },
]

steps:
- name: 📥 Checkout repository
- name: Checkout repository
uses: actions/checkout@v4

- name: 📦 Composer install
- name: Composer install
uses: php-actions/composer@v6
with:
php-version: ${{ matrix.php }}
php_version: ${{ matrix.versions.php }}

- name: 🧰 Run unit tests
uses: php-actions/phpunit@v3
- name: Run unit tests
uses: php-actions/phpunit@v3.0.0
with:
configuration: phpunit.xml
php_version: ${{ matrix.php }}
version: ${{ matrix.versions.phpunit }}
php_version: ${{ matrix.versions.php }}

check-code-style:
name: 💅🏻 Check code style
name: Check code style
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: 📥 Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: 🛠 Run php-cs-fixer
- name: Run php-cs-fixer
uses: docker://oskarstark/php-cs-fixer-ga

- name: 🤖 Apply php-cs-fixer changes
- name: Apply php-cs-fixer changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes
6 changes: 3 additions & 3 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
- master

jobs:
update_release_draft:
name: ✏️ Draft release
update-release-draft:
name: Update
runs-on: ubuntu-latest
steps:
- name: 🚀 Run Release Drafter
- name: Run release drafter
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ on:

jobs:
labels:
name: ♻️ Sync labels
name: Sync labels
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
- name: Checkout repository
uses: actions/checkout@v4

- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1
- name: Run Label Syncer
uses: micnncim/action-label-syncer@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
name: PR
name: PR Labels

# yamllint disable-line rule:truthy
on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
verify_pr_labels:
name: 🏷 Verify Labels
pr-labels:
name: Verify
runs-on: ubuntu-latest

steps:
- name: Verify PR has a valid label
- name: Verify PR has a valid label
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
pull-request-number: "${{ github.event.pull_request.number }}"
valid-labels: >-
breaking-change, bugfix, documentation, enhancement,
refactor, performance, new-feature, maintenance, ci, dependencies
breaking-change, bugfix, hotfix, documentation, enhancement,
refactor, performance, new-feature, maintenance, ci,
dependencies, skip-changelog
disable-reviews: true

0 comments on commit 49b20e5

Please sign in to comment.