diff --git a/.github/workflows/admin.yml b/.github/workflows/admin.yml new file mode 100644 index 000000000..e6d4bd4ae --- /dev/null +++ b/.github/workflows/admin.yml @@ -0,0 +1,17 @@ +name: Administration +on: + push: +jobs: + unit: + name: Jest + uses: shopware/github-actions/.github/workflows/admin-jest.yml@main + with: + extensionName: ${{ github.event.repository.name }} + uploadCoverage: true + secrets: + codecovToken: ${{ secrets.CODECOV_TOKEN }} + lint: + name: ESLint + uses: shopware/github-actions/.github/workflows/admin-eslint.yml@main + with: + extensionName: ${{ github.event.repository.name }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..f3ac165a5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,8 @@ +name: Build +on: + push: +jobs: + build: + uses: shopware/github-actions/.github/workflows/build-zip.yml@main + with: + extensionName: ${{ github.event.repository.name }} \ No newline at end of file diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 000000000..b340e1b52 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,12 @@ +name: PHP +on: + push: + paths: + - '**/*.php' +jobs: + cs: + uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main + phpstan: + uses: shopware/github-actions/.github/workflows/phpstan.yml@main + with: + extensionName: ${{ github.event.repository.name }} \ No newline at end of file diff --git a/.github/workflows/storefront.yml b/.github/workflows/storefront.yml new file mode 100644 index 000000000..47629e08b --- /dev/null +++ b/.github/workflows/storefront.yml @@ -0,0 +1,35 @@ +name: ESLint Storefront +on: + push: +jobs: + run: + name: ESLint Storefront + runs-on: ubuntu-latest + steps: + - name: Clone Shopware + uses: actions/checkout@v4 + with: + repository: shopware/shopware + ref: trunk + + - name: Clone Extension + uses: actions/checkout@v4 + with: + path: custom/plugins/${{ inputs.extensionName }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Install Plugin Dependencies + working-directory: custom/plugins/${{ inputs.extensionName }}/src/Resources/app/storefront + run: npm install --no-audit --no-fund --prefer-offline + + - name: Install platform Dependencies + working-directory: src/Storefront/Resources/app/storefront + run: npm install --no-audit --no-fund --prefer-offline + + - name: Run ESLint + working-directory: custom/plugins/${{ inputs.extensionName }} + run: ../../src/Storefront/Resources/app/storefront/node_modules/.bin/eslint --config ../../src/Storefront/Resources/app/storefront/.eslintrc.js src/Resources/app/storefront \ No newline at end of file diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml new file mode 100644 index 000000000..763eb50fb --- /dev/null +++ b/.github/workflows/unit.yml @@ -0,0 +1,13 @@ +name: Unit +on: + push: + workflow_dispatch: +jobs: + phpunit: + uses: shopware/github-actions/.github/workflows/phpunit.yml@main + with: + extensionName: ${{ github.event.repository.name }} + shopwareVersion: trunk + uploadCoverage: true + secrets: + codecovToken: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file