-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (42 loc) · 1.43 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
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 }}