Skip to content

Commit

Permalink
Merge pull request #284 from imdhemy/improve-workflows
Browse files Browse the repository at this point in the history
Improve workflows
  • Loading branch information
imdhemy authored Feb 12, 2023
2 parents 154a3e2 + 71889e3 commit ea6094d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 60 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ updates:
package-ecosystem: composer
schedule:
interval: weekly
day: monday
time: "00:00"
timezone: Europe/Berlin
versioning-strategy: increase
reviewers:
- "imdhemy"
71 changes: 13 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Continuous Integration"

on:
pull_request:
push:
on: [ push, pull_request ]

jobs:
phpunit:
name: "PHPUnit tests"
tests:
name: "🧪 Tests"

runs-on: ${{ matrix.operating-system }}

Expand Down Expand Up @@ -43,73 +39,32 @@ jobs:
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Tests"
- name: "Run tests"
run: "composer test"

static-analysis-psalm:
name: "Static Analysis by Psalm"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"

code-quality:
name: "🔬 Check code quality"
needs: tests
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
php-version: "8.1"
ini-values: memory_limit=-1
extensions: sodium, fileinfo

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
dependency-versions: "locked"

- name: "psalm"
- name: "Psalm"
run: "composer psalm"

coding-standards:
name: "Check Coding Standards"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: sodium, fileinfo

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Coding Standard"
- name: "Cs Fixer"
run: "composer check-style"
2 changes: 1 addition & 1 deletion .github/workflows/close-stales.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
- cron: '0 0 * * *'

jobs:
stale:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
with:
# Fetch entire history of repository to ensure relase date can be
# Fetch entire history of repository to ensure release date can be
# extracted from commit of the given tag.
fetch-depth: 0
# Checkout target branch of this release. Ensures that the CHANGELOG
Expand Down

0 comments on commit ea6094d

Please sign in to comment.