Skip to content

Commit

Permalink
reuse workflows to test against php 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Jan 19, 2025
1 parent 111c5f6 commit dc32a6d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 121 deletions.
72 changes: 7 additions & 65 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,12 @@ name: CI
on: [push]

jobs:
phpunit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
php-version: ['8.2', '8.3']
dependencies: ['lowest', 'highest']
name: 'BlackBox'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
coverage: xdebug
- name: Composer
uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependencies }}
- name: BlackBox
run: php blackbox.php
env:
ENABLE_COVERAGE: 'true'
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
coverage:
uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@main
secrets: inherit
psalm:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2', '8.3']
dependencies: ['lowest', 'highest']
name: 'Psalm'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
- name: Composer
uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Psalm
run: vendor/bin/psalm --shepherd
uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main
cs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2']
name: 'CS'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
- name: Composer
uses: "ramsey/composer-install@v3"
- name: CS
run: vendor/bin/php-cs-fixer fix --diff --dry-run
uses: innmind/github-workflows/.github/workflows/cs.yml@main
with:
php-version: '8.2'
23 changes: 3 additions & 20 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
name: Documentation
on:
push:
branches: [master]
branches: [master, main]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
uses: innmind/github-workflows/.github/workflows/documentation.yml@main
secrets: inherit
28 changes: 6 additions & 22 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,9 @@ on:

jobs:
blackbox:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php-version: ['8.3']
dependency-versions: ['highest']
name: 'BlackBox'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
coverage: none
- name: Composer
uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependencies }}
- name: BlackBox
run: php blackbox.php ci
uses: innmind/github-workflows/.github/workflows/coverage.yml@main
secrets: inherit
with:
tags: ci
os: ubuntu-latest
php-version: '8.3'
16 changes: 2 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ on:
tags:
- '*'

permissions:
contents: write

jobs:
release:
name: Create release
runs-on: ubuntu-22.04
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--generate-notes
uses: innmind/github-workflows/.github/workflows/release.yml@main
secrets: inherit

0 comments on commit dc32a6d

Please sign in to comment.