From d8c06c424906c9d8b45cba6e32d59d915d9ef3a8 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Fri, 11 Oct 2024 15:40:44 +0700 Subject: [PATCH] fix: ci --- .github/workflows/ci.yml | 12 ++++++++---- bower.json | 8 -------- eslint.config.mjs | 8 ++++++++ package.json | 4 +++- test/Test/action.yml | 12 ------------ test/action.yml | 12 ++++++++++++ test/{Test => }/index.js | 0 7 files changed, 31 insertions(+), 25 deletions(-) delete mode 100644 bower.json create mode 100644 eslint.config.mjs delete mode 100644 test/Test/action.yml create mode 100644 test/action.yml rename test/{Test => }/index.js (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89cbf03..821a4e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,11 +46,15 @@ jobs: - name: Install NPM dependencies run: npm install - - name: Build source - run: spago build --censor-stats --strict --ensure-ranges --pedantic-packages + - name: Build the project + run: npm run build - - name: Run tests - run: spago test --offline --censor-stats --strict --pedantic-packages + - name: Build and bundle tests + run: ./node_modules/@vercel/ncc/dist/ncc/cli.js build --minify test/index.js + + - uses: ./test + with: + testinput: test - name: Verify formatting run: purs-tidy check src test diff --git a/bower.json b/bower.json deleted file mode 100644 index a96a0d9..0000000 --- a/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "purescript-github-actions-toolkit", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/purescript-contrib/purescript-github-actions-toolkit" - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..2edbef8 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,8 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; + + +export default [ + {languageOptions: { globals: globals.browser }}, + pluginJs.configs.recommended, +]; \ No newline at end of file diff --git a/package.json b/package.json index a46d49a..0d79887 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,10 @@ "test": "spago test --offline" }, "devDependencies": { + "@eslint/js": "^9.12.0", "@vercel/ncc": "^0.38.2", - "eslint": "^9.12.0" + "eslint": "^9.12.0", + "globals": "^15.11.0" }, "dependencies": { "@actions/cache": "^3.2.4", diff --git a/test/Test/action.yml b/test/Test/action.yml deleted file mode 100644 index 20b3a5b..0000000 --- a/test/Test/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Test' -description: 'Test out bindings in this library' -runs: - using: 'node20' - main: '../dist/index.js' -inputs: - testinput: - description: 'Test input for test action' - required: true -outputs: - testoutput: - description: 'Test output for test action' diff --git a/test/action.yml b/test/action.yml new file mode 100644 index 0000000..8551718 --- /dev/null +++ b/test/action.yml @@ -0,0 +1,12 @@ +name: "Test" +description: "Test out bindings in this library" +runs: + using: "node20" + main: "../dist/index.js" +inputs: + testinput: + description: "Test input for test action" + required: true +outputs: + testoutput: + description: "Test output for test action" diff --git a/test/Test/index.js b/test/index.js similarity index 100% rename from test/Test/index.js rename to test/index.js