Skip to content

Update reuseable workflows; Ignore composer.lock #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

template: |
# What's Changed

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

categories:
- title: '️:arrow_up: Dependencies'
collapse-after: 3
labels:
- dependencies
- title: ':robot: Automated Commits'
collapse-after: 3
labels:
- tastendruck
- github_actions
_extends: .github
3 changes: 3 additions & 0 deletions .github/workflows/composer-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- main
paths:
- .github/workflows/composer-audit.yml
- composer.*

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ on:
branches:
- main
paths:
- .github/workflows/pint.yml
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'pint.json'
- '.github/workflows/pint.yml'
- composer.*
- pint.json

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ on:
permissions: {}

jobs:
update-release-draft:
runs-on: ubuntu-latest
release-drafter:
uses: typisttech/.github/.github/workflows/release-drafter.yml@v2
permissions:
contents: write
pull-requests: read
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 16 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,35 @@ permissions: {}
jobs:
pest:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dependency-versions: lowest
coverage: none
- dependency-versions: highest
coverage: xdebug
steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: xdebug
coverage: ${{ matrix.coverage }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: ramsey/composer-install@v3
with:
composer-options: --optimize-autoloader
dependency-versions: ${{ matrix.dependency-versions }}
composer-options: --no-audit --optimize-autoloader

# TODO: `--fail-on-incomplete` doesn't fail
# See: https://github.com/pestphp/pest/issues/1328
- run: composer pest:unit -- --coverage-clover coverage-unit.xml --ci --bail --stop-on-incomplete --fail-on-incomplete
- run: composer pest:feature -- --coverage-clover coverage-feature.xml --ci --bail --stop-on-incomplete --fail-on-incomplete

- uses: actions/upload-artifact@v4
if: matrix.coverage == 'xdebug'
with:
name: coverage
path: |
Expand All @@ -47,6 +56,9 @@ jobs:
e2e:
needs: pest
runs-on: ubuntu-latest
strategy:
matrix:
dependency-versions: [lowest, highest]
steps:
- uses: actions/checkout@v4

Expand All @@ -59,7 +71,8 @@ jobs:

- uses: ramsey/composer-install@v3
with:
composer-options: --optimize-autoloader
dependency-versions: ${{ matrix.dependency-versions }}
composer-options: --no-audit --optimize-autoloader

# TODO: `--fail-on-incomplete` doesn't fail
# See: https://github.com/pestphp/pest/issues/1328
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@ name: Update Data
on:
workflow_dispatch:
schedule:
- cron: '13 3 * * 1' # Weekly on Monday
- cron: 13 3 * * 1 # Weekly on Monday
push:
branches:
- main
paths-ignore:
- .github/**
- .gitattributes
- .gitignore
- LICENSE
- pint.json
- README.md
- '!.github/workflows/update-data.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand All @@ -20,8 +31,5 @@ jobs:
command: composer data:update
php-version: '8.4'
branch: "tastendruck/github_actions/update-data/${{ github.ref_name }}"
labels: |
tastendruck
github_actions
update-data
labels: update_data
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Composer template
composer.phar
composer.lock
/vendor/
/coverage*.xml
Loading
Loading