Skip to content

EMA-150

EMA-150 #73

Workflow file for this run

---
name: Lint code
on:
pull_request:
branches:
- "*"
jobs:
lint:
runs-on: github-actions-runner-emarsys
permissions:
contents: "read"
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Checkout code
shell: bash
run: |
sudo apt-get update
sudo apt-get install git -y
git clone --branch ${{ steps.extract_branch.outputs.branch }} https://github.com/emartech/magento2-extension.git
- name: Login to GitLab
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ secrets.GITLAB_USER }}
password: ${{ secrets.GITLAB_TOKEN }}
- name: Run codesniffer
shell: bash
run: |
cd magento2-extension
sh dev/testv2/tools/scripts/run-code-style.sh
env:
VERSION: 2.4.0ce
# - name: Run eslint
# shell: bash
# run: |
# cd magento2-extension
# docker run --rm -v $(pwd)/dev/testv2:/test -e NPM_TOKEN=${NPM_TOKEN} "${{ vars.REGISTRY_URL }}/itg-commerce/emarsys-magento2-extension-test/mage_node" sh -c "npm i && ./node_modules/.bin/cypress install && ./node_modules/.bin/cypress verify && npm run code-style"
# env:
# NPM_TOKEN: ${{ secrets.NPM_PUBLISHER_TOKEN }}