Skip to content
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

Upgrade the automerge-released-trunk, coverage-report, and prepare-php actions to use Node.js v20 #114

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
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
automerge_trunk:
runs-on: ubuntu-latest
steps:
- uses: woocommerce/grow/automerge-released-trunk@actions-v1
- uses: woocommerce/grow/automerge-released-trunk@actions-v2
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "Merge the release to develop"
shell: bash
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.event.pull_request.user.login == 'github-actions[bot]' }}
Expand Down
6 changes: 3 additions & 3 deletions packages/github-actions/actions/coverage-report/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:

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

- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v1
uses: woocommerce/grow/prepare-php@actions-v2

- name: Run unit tests (with coverage report)
run: phpdbg -qrr vendor/bin/phpunit --coverage-clover=tests/coverage/report.xml

- name: PHP unit coverage report
uses: woocommerce/grow/coverage-report@actions-v1
uses: woocommerce/grow/coverage-report@actions-v2
with:
base-branch: trunk
test-comment: "PHP unit test coverage"
Expand Down
4 changes: 2 additions & 2 deletions packages/github-actions/actions/coverage-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ runs:

# Download coverage report artifact
- if: github.event_name == 'pull_request'
uses: dawidd6/action-download-artifact@v2.14.1
uses: dawidd6/action-download-artifact@v3
continue-on-error: true
with:
workflow: ${{ inputs.workflow }}
Expand All @@ -52,7 +52,7 @@ runs:

# Save coverage report as an artifact
- if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.report-name }}
path: "${{ inputs.report-path }}/${{ inputs.report-file }}"
Expand Down
20 changes: 10 additions & 10 deletions packages/github-actions/actions/prepare-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

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

- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v1
uses: woocommerce/grow/prepare-php@actions-v2

- name: Run unit tests
run: vendor/bin/phpunit
Expand All @@ -37,10 +37,10 @@ jobs:
```yaml
steps:
- name: Checkout repository
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v1
uses: woocommerce/grow/prepare-php@actions-v2
with:
php-version: 8.1
```
Expand All @@ -50,10 +50,10 @@ steps:
```yaml
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v1
uses: woocommerce/grow/prepare-php@actions-v2
with:
tools: cs2pr

Expand All @@ -70,10 +70,10 @@ To use Composer v1, set this parameter with `composer:v1`
```yaml
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v1
uses: woocommerce/grow/prepare-php@actions-v2
with:
coverage: xdebug
```
Expand All @@ -87,10 +87,10 @@ The `coverage` is `"none"` by default to disable both `Xdebug` and `PCOV`.
```yaml
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v1
uses: woocommerce/grow/prepare-php@actions-v2
with:
install-deps: "no"

Expand Down
2 changes: 1 addition & 1 deletion packages/github-actions/actions/prepare-php/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

# Set up Composer caching.
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache-config.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down