Skip to content

GitHub actions

GitHub actions #60

Workflow file for this run

name: PHP
on:
pull_request:
paths:
- '**/*.php'
- .github/workflows/php.yml
push:
paths:
- '**/*.php'
branches:
- trunk
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
env:
SHOPWARE_TOOL_CACHE_PHPSTAN: ${{ github.workspace }}/var/phpstan
DEPENDENCIES_WITH_COMMERCIAL: |-
[
{"name": "SwagCommercial", "repo": "https://shopware:[email protected]/shopware/6/product/commercial.git"},
{"name": "SwagCmsExtensions", "repo": "https://shopware:[email protected]/shopware/6/services/cms-extensions.git"}
]
DEPENDENCIES_WITHOUT_COMMERCIAL: |-
[
{"name": "SwagCmsExtensions", "repo": "https://shopware:[email protected]/shopware/6/services/cms-extensions.git"}
]
jobs:
compute:
runs-on: ubuntu-latest
outputs:
DEPS_WITH_COMMERCIAL: ${{ steps.compute.outputs.DEPS_WITH_COMMERCIAL }}
DEPS_WITHOUT_COMMERCIAL: ${{ steps.compute.outputs.DEPS_WITHOUT_COMMERCIAL }}
steps:
- name: Compute outputs
id: compute
run: |
echo "DEPS_WITH_COMMERCIAL=$(echo "$DEPENDENCIES_WITH_COMMERCIAL" | jq -c '.' 2>&1)" >> $GITHUB_OUTPUT
echo "DEPS_WITHOUT_COMMERCIAL=$(echo "$DEPENDENCIES_WITHOUT_COMMERCIAL" | jq -c '.' 2>&1)" >> $GITHUB_OUTPUT
test-compute:
runs-on: ubuntu-latest
needs: compute
steps:
- name: Test outputs
env:
testEnv: ${{needs.compute.outputs.DEPS_WITH_COMMERCIAL}}
run: |
echo ${{needs.compute.outputs.DEPS_WITH_COMMERCIAL}}
echo $testEnv
# cs:
# if: github.event_name != 'schedule'
# uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main
# phpstan:
# uses: shopware/github-actions/.github/workflows/phpstan.yml@main
# with:
# extensionName: SwagPayPal
# shopwareVersion: trunk
# dependencies: |-
# [
# {"name": "SwagCommercial", "repo": "https://shopware:[email protected]/shopware/6/product/commercial.git"},
# {"name": "SwagCmsExtensions", "repo": "https://shopware:[email protected]/shopware/6/services/cms-extensions.git"}
# ]
# secrets:
# env: |-
# CMS_TOKEN=${{ secrets.CMS_GITLAB_TOKEN }}
# COMMERCIAL_TOKEN=${{ secrets.COMMERCIAL_GITLAB_TOKEN }}
phpunit:
uses: shopware/github-actions/.github/workflows/phpunit.yml@main
strategy:
matrix:
phpVersion: [ 8.2, 8.3 ]
# mysqlVersion: ["mysql:8.0", "mariadb:10.11"]
dependencies: ["${{ env.DEPENDENCIES_WITH_COMMERCIAL }}" ]

Check failure on line 74 in .github/workflows/php.yml

View workflow run for this annotation

GitHub Actions / PHP

Invalid workflow file

The workflow is not valid. .github/workflows/php.yml (Line: 74, Col: 24): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DEPENDENCIES_WITH_COMMERCIAL
with:
uploadCoverage: true
extensionName: SwagPayPal
shopwareVersion: ${{ matrix.shopware-version }}
phpVersion: ${{ matrix.phpVersion }}
# mysqlVersion: ${{ matrix.mysqlVersion }}
dependencies: ${{ matrix.dependencies }}
secrets:
env: |-
CMS_TOKEN=${{ secrets.CMS_GITLAB_TOKEN }}
codecovToken: ${{ secrets.CODECOV_TOKEN }}
#