From e7b9cd1e6ddf1d4c4a3b3c2483a17694d757a0fa Mon Sep 17 00:00:00 2001 From: Aydin Hassan Date: Fri, 19 Jan 2024 16:53:31 +0100 Subject: [PATCH] Try eslint --- .github/workflows/admin.yml | 21 +++++++++++++++++++ .github/workflows/storefront.yml | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/admin.yml create mode 100644 .github/workflows/storefront.yml diff --git a/.github/workflows/admin.yml b/.github/workflows/admin.yml new file mode 100644 index 000000000..e47bb24f3 --- /dev/null +++ b/.github/workflows/admin.yml @@ -0,0 +1,21 @@ +name: Administration +on: + push: + branches: + - trunk + pull_request: + +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 }} diff --git a/.github/workflows/storefront.yml b/.github/workflows/storefront.yml new file mode 100644 index 000000000..0ceb81da2 --- /dev/null +++ b/.github/workflows/storefront.yml @@ -0,0 +1,36 @@ +name: Storefront +on: + push: + branches: + - trunk + pull_request: + +jobs: + lint: + 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/${{ github.event.repository.name }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Install Plugin Dependencies + working-directory: custom/plugins/${{ github.event.repository.name }}/src/Resources/app/storefront + run: npm install --no-audit --no-fund --prefer-offline + + - name: Run ESLint + working-directory: custom/plugins/${{ github.event.repository.name }}/src/Resources/app/administration + run: | + ../../../../../../../src/Storefront/Resources/app/storefront/node_modules/.bin/eslint --config ../../../../../../../src/Storefront/Resources/app/storefront/.eslintrc.js ./src + ../../../../../../../src/Storefront/Resources/app/storefront/node_modules/.bin/stylelint --config ../../../../../../../src/Storefront/Resources/app/storefront/stylelint.config.js ./src +