diff --git a/tests/.eslintrc.js b/.eslintrc.js similarity index 100% rename from tests/.eslintrc.js rename to .eslintrc.js diff --git a/.github/workflows/coding-style.yml b/.github/workflows/coding-style.yml index 964b0c311..fce838618 100644 --- a/.github/workflows/coding-style.yml +++ b/.github/workflows/coding-style.yml @@ -29,3 +29,12 @@ jobs: - run: composer create-project nette/coding-standard temp/coding-standard ^3 --no-progress - run: php temp/coding-standard/ecs check src tests + + + eslint: + name: ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: npm install + - run: npx eslint src/assets/netteForms.js diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa386a1e9..0122e953f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,3 +58,13 @@ jobs: - env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: php php-coveralls.phar --verbose --config tests/.coveralls.yml + + + jasmine: + name: JavaScript tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + #- run: npm install -g grunt-cli + - run: npm install + - run: grunt --gruntfile=tests/netteForms/Gruntfile.js test diff --git a/.gitignore b/.gitignore index de4a392c3..a4b2d2c77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor /composer.lock +/node_modules diff --git a/package.json b/package.json index d4da5ce0d..d4b72f1c7 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,12 @@ "repository": { "type": "git", "url": "git+https://github.com/nette/forms.git" + }, + "devDependencies": { + "eslint": "^7.32.0", + "grunt": "^1.2.1", + "grunt-contrib-jasmine": "^2.2.0", + "jasmine": "^3.5.0", + "js-fixtures": "^1.5.3" } } diff --git a/tests/netteForms/package.json b/tests/netteForms/package.json deleted file mode 100644 index 3417de3d2..000000000 --- a/tests/netteForms/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "devDependencies": { - "eslint": "^7.4.0", - "grunt": "^1.2.1", - "grunt-contrib-jasmine": "^2.2.0", - "jasmine": "^3.5.0", - "js-fixtures": "^1.5.3" - } -}