-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: bognar.tamas <[email protected]>
- Loading branch information
1 parent
55416c2
commit 9e699e2
Showing
66 changed files
with
11,551 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: Lint code | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
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 }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: github-actions-runner-emarsys | ||
permissions: | ||
contents: "read" | ||
strategy: | ||
max-parallel: 2 | ||
fail-fast: false | ||
matrix: | ||
magento-versions: | ||
["2.3.3ce", "2.3.5ce", "2.4.0ce", "2.4.2ce", "2.4.4ce", "2.4.6ce"] | ||
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: Install system tools | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ca-certificates curl gnupg -y | ||
sudo install -m 0755 -d /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | ||
sudo chmod a+r /etc/apt/keyrings/docker.gpg | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt-get update | ||
sudo apt-get install docker-compose-plugin -y | ||
- name: Run unittest | ||
shell: bash | ||
run: | | ||
cd magento2-extension | ||
bash dev/testv2/tools/scripts/run-unit.sh | ||
env: | ||
VERSION: ${{ matrix.magento-versions }} | ||
e2e-tests: | ||
runs-on: github-actions-runner-emarsys | ||
permissions: | ||
contents: "read" | ||
strategy: | ||
max-parallel: 2 | ||
fail-fast: false | ||
matrix: | ||
magento-versions: | ||
["2.3.3ce", "2.3.5ce", "2.4.0ce", "2.4.2ce", "2.4.4ce", "2.4.6ce"] | ||
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: Install system tools | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ca-certificates curl gnupg -y | ||
sudo install -m 0755 -d /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | ||
sudo chmod a+r /etc/apt/keyrings/docker.gpg | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt-get update | ||
sudo apt-get install docker-compose-plugin -y | ||
- name: Run e2stest | ||
shell: bash | ||
run: | | ||
cd magento2-extension | ||
bash dev/testv2/tools/scripts/run-e2e.sh | ||
env: | ||
VERSION: ${{ matrix.magento-versions }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.env | ||
!dev/jenkins/.env | ||
!dev/testv2/tools/setup/.env | ||
dev/db-data/ | ||
dev/test/node_modules | ||
codeship.aes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"emarsys" | ||
], | ||
"plugins": [ | ||
"mocha" | ||
], | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"mocha": true, | ||
"browser": true | ||
}, | ||
"globals": { | ||
"inject": true, | ||
"onmessage": true, | ||
"expect": true, | ||
"describe": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 9 | ||
}, | ||
"rules": { | ||
"curly": [2, "multi-line"], | ||
"new-cap": 0, | ||
"no-unused-expressions": 0, | ||
"operator-linebreak": "off", | ||
"require-yield": 0, | ||
"security/detect-child-process": 0, | ||
"security/detect-non-literal-fs-filename": 0, | ||
"security/detect-non-literal-require": 0, | ||
"security/detect-object-injection": 0, | ||
"space-before-function-paren": 0, | ||
// TODO | ||
"indent": "off", | ||
"object-curly-spacing": 0, | ||
"one-var": 0, | ||
"dot-notation": 0, | ||
"comma-dangle": 0, | ||
"semi": 0, | ||
"key-spacing": 0, | ||
"max-len": 0, | ||
"strict": 0, | ||
"quotes": 0, | ||
"no-unused-vars": 0, | ||
"no-undef": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} |
Oops, something went wrong.