Skip to content

Commit

Permalink
PPI-955 - Added Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianKe committed Jul 19, 2024
1 parent 4476ec7 commit bea3729
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
@@ -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 }}
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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 }}
12 changes: 12 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -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 }}
35 changes: 35 additions & 0 deletions .github/workflows/storefront.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Unit
on:
push:
workflow_dispatch:
jobs:
phpunit:
uses: FlorianKe/github-actions/.github/workflows/phpunit.yml@added-lint-and-plugin-composer-install
with:
extensionName: ${{ github.event.repository.name }}
composerInstall: true
shopwareVersion: trunk
uploadCoverage: true
dependencies: |
[
{ "name": "SwagCmsExtensions", "repo": "git@github.com:shopware/SwagCmsExtensions.git" },
{ "name": "SwagCommercial", "repo": "git@gitlab.shopware.com:shopware/6/product/commercial.git" }
]
secrets:
codecovToken: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit bea3729

Please sign in to comment.