Skip to content

Commit

Permalink
ci: improve pdk setup
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Oct 4, 2024
1 parent 5a8a208 commit 28539c6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ jobs:
phpstan-cache-${{ hashFiles('phpstan.neon.dist', 'composer.json') }}-
phpstan-cache-
- uses: myparcelnl/actions/pdk-setup-backend@v4
id: setup
- uses: myparcelnl/actions/pdk-setup-upgrade@v4
if: steps.phpstan-cache.outputs.cache-hit != 'true'
id: setup
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
php-version: ${{ vars.PHP_VERSION }}
mode: 'backend'

- name: 'Run PHPStan analysis'
if: steps.phpstan-cache.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- test
- analyse
steps:
- uses: myparcelnl/actions/pdk-prerelease-pr@v4
- uses: myparcelnl/actions/pdk-prerelease@v4
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/pdk-prerelease-push@v4
- uses: myparcelnl/actions/pdk-prerelease@v4
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,12 @@ jobs:
key: coverage-frontend-${{ hashFiles('**/package.json', '**/yarn.lock', 'views/**/*') }}
path: coverage/views

- uses: myparcelnl/actions/pdk-setup-frontend@v4
if: steps.coverage-cache.outputs.cache-hit != 'true'

- uses: myparcelnl/actions/pdk-upgrade@v4
- uses: myparcelnl/actions/pdk-setup-upgrade@v4
if: steps.coverage-cache.outputs.cache-hit != 'true'
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
report: 'false'
no-check: true
no-commit: true
mode: 'frontend'

- name: 'Run frontend tests'
if: steps.coverage-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -79,22 +74,14 @@ jobs:
path: clover.xml
key: coverage-backend-${{ hashFiles('**/composer.json', '**/composer.lock', 'src/**/*', 'tests/**/*') }}

- uses: myparcelnl/actions/pdk-setup@v4
id: setup
if: steps.coverage-cache.outputs.cache-hit != 'true'
with:
php-version: ${{ vars.PHP_VERSION }}
composer-dev: 'true'

- uses: myparcelnl/actions/pdk-upgrade@v4
- uses: myparcelnl/actions/pdk-setup-upgrade@v4
if: steps.coverage-cache.outputs.cache-hit != 'true'
id: setup
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
report: 'false'
no-check: true
no-commit: true
image: ${{ steps.setup.outputs.image }}
php-version: ${{ vars.PHP_VERSION }}
mode: 'backend'

- uses: myparcelnl/actions/composer-pest@v4
if: steps.coverage-cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 28539c6

Please sign in to comment.