From 16b0a68bca13a6f4855b944701d6b96304f2ef56 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 24 Oct 2023 01:03:33 +0200 Subject: [PATCH] wip --- tests/.eslintrc.js => .eslintrc.js | 0 .github/workflows/coding-style.yml | 9 +++++++++ .github/workflows/tests.yml | 10 ++++++++++ .gitignore | 1 + package.json | 7 +++++++ tests/netteForms/package.json | 9 --------- 6 files changed, 27 insertions(+), 9 deletions(-) rename tests/.eslintrc.js => .eslintrc.js (100%) delete mode 100644 tests/netteForms/package.json 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..54eb93dfc 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 --config tests/.eslintrc.js diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa386a1e9..a362ca111 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" - } -}