diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 121f52391..e526d7e1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: - name: Install modules run: npm install - name: Run ESLint - run: npm --silent run lint + run: npm run lint typescript-compile: runs-on: ubuntu-latest @@ -19,7 +19,7 @@ jobs: - name: Install modules run: npm install - name: Run Typescipt Compiler - run: npm --silent run build + run: npm run build jest: runs-on: ubuntu-latest @@ -28,4 +28,4 @@ jobs: - name: Install modules run: npm install - name: Run tests - run: npm --silent run test + run: npm run test diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..fefd472e3 --- /dev/null +++ b/.npmrc @@ -0,0 +1,4 @@ +loglevel=silent +fund=false +audit=false +update-notifier=false diff --git a/README.md b/README.md index edc0413b9..a26ae04dc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Run gitlab pipelines locally as shell executor or docker executor. Get rid of all those dev specific shell scripts and make files. -[![Lines](https://img.shields.io/badge/Coverage-90.79%25-brightgreen.svg)](https://npmjs.org/package/gitlab-ci-local) +[![Lines](https://img.shields.io/badge/Coverage-90.78%25-brightgreen.svg)](https://npmjs.org/package/gitlab-ci-local) [![build](https://img.shields.io/github/workflow/status/firecow/gitlab-ci-local/build)](https://github.com/firecow/gitlab-ci-local/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=firecow_gitlab-ci-local&metric=alert_status)](https://sonarcloud.io/dashboard?id=firecow_gitlab-ci-local) [![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/firecow/gitlab-ci-local)](https://npmjs.org/package/gitlab-ci-local) @@ -62,6 +62,16 @@ chmod +x /usr/local/bin/gitlab-ci-local exit ``` +### Windows (Git bash) + +Install [gitbash](https://git-scm.com/downloads) + +Download and put binary in `C:\Program Files\Git\mingw64\bin` + +```bash +curl -L https://github.com/firecow/gitlab-ci-local/releases/latest/download/win.gz | gunzip -c > /c/Program\ Files/Git/mingw64/bin/gitlab-ci-local.exe +``` + ## Convinience ### Bash alias diff --git a/coverage/coverage-summary.json b/coverage/coverage-summary.json index 5b96443c4..a3d67cb82 100644 --- a/coverage/coverage-summary.json +++ b/coverage/coverage-summary.json @@ -1,4 +1,4 @@ -{"total": {"lines":{"total":706,"covered":641,"skipped":0,"pct":90.79},"statements":{"total":730,"covered":659,"skipped":0,"pct":90.27},"functions":{"total":115,"covered":102,"skipped":0,"pct":88.7},"branches":{"total":400,"covered":321,"skipped":0,"pct":80.25}} +{"total": {"lines":{"total":705,"covered":640,"skipped":0,"pct":90.78},"statements":{"total":729,"covered":658,"skipped":0,"pct":90.26},"functions":{"total":114,"covered":101,"skipped":0,"pct":88.6},"branches":{"total":398,"covered":320,"skipped":0,"pct":80.4}} ,"/home/mjn/Workspace/gitlab-ci-local/src/commander.ts": {"lines":{"total":109,"covered":94,"skipped":0,"pct":86.24},"functions":{"total":13,"covered":10,"skipped":0,"pct":76.92},"statements":{"total":117,"covered":99,"skipped":0,"pct":84.62},"branches":{"total":63,"covered":48,"skipped":0,"pct":76.19}} ,"/home/mjn/Workspace/gitlab-ci-local/src/default-cmd.ts": {"lines":{"total":44,"covered":40,"skipped":0,"pct":90.91},"functions":{"total":4,"covered":3,"skipped":0,"pct":75},"statements":{"total":44,"covered":40,"skipped":0,"pct":90.91},"branches":{"total":20,"covered":16,"skipped":0,"pct":80}} ,"/home/mjn/Workspace/gitlab-ci-local/src/job-expanders.ts": {"lines":{"total":56,"covered":55,"skipped":0,"pct":98.21},"functions":{"total":12,"covered":12,"skipped":0,"pct":100},"statements":{"total":56,"covered":55,"skipped":0,"pct":98.21},"branches":{"total":54,"covered":51,"skipped":0,"pct":94.44}} @@ -6,6 +6,6 @@ ,"/home/mjn/Workspace/gitlab-ci-local/src/parser.ts": {"lines":{"total":194,"covered":168,"skipped":0,"pct":86.6},"functions":{"total":22,"covered":20,"skipped":0,"pct":90.91},"statements":{"total":197,"covered":171,"skipped":0,"pct":86.8},"branches":{"total":109,"covered":75,"skipped":0,"pct":68.81}} ,"/home/mjn/Workspace/gitlab-ci-local/src/stage.ts": {"lines":{"total":7,"covered":7,"skipped":0,"pct":100},"functions":{"total":7,"covered":7,"skipped":0,"pct":100},"statements":{"total":9,"covered":9,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} ,"/home/mjn/Workspace/gitlab-ci-local/src/state.ts": {"lines":{"total":22,"covered":22,"skipped":0,"pct":100},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":25,"covered":25,"skipped":0,"pct":100},"branches":{"total":8,"covered":6,"skipped":0,"pct":75}} -,"/home/mjn/Workspace/gitlab-ci-local/src/utils.ts": {"lines":{"total":66,"covered":62,"skipped":0,"pct":93.94},"functions":{"total":15,"covered":13,"skipped":0,"pct":86.67},"statements":{"total":66,"covered":62,"skipped":0,"pct":93.94},"branches":{"total":41,"covered":35,"skipped":0,"pct":85.37}} +,"/home/mjn/Workspace/gitlab-ci-local/src/utils.ts": {"lines":{"total":65,"covered":61,"skipped":0,"pct":93.85},"functions":{"total":14,"covered":12,"skipped":0,"pct":85.71},"statements":{"total":65,"covered":61,"skipped":0,"pct":93.85},"branches":{"total":39,"covered":34,"skipped":0,"pct":87.18}} ,"/home/mjn/Workspace/gitlab-ci-local/src/types/exit-error.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":1,"covered":1,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} } diff --git a/package-lock.json b/package-lock.json index 94a46e241..9b11771ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "gitlab-ci-local", - "version": "4.9.7", + "version": "4.9.8", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "4.9.7", + "version": "4.9.8", "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", diff --git a/package.json b/package.json index d00cc2e00..2943a827e 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,13 @@ "name": "gitlab-ci-local", "main": "src/index.js", "bin": "src/index.js", - "version": "4.9.7", + "version": "4.9.8", "scripts": { "prepublishOnly": "npm run check-all && chmod +x src/index.js", - "pkg-linux": "pkg src/index.js --public -t linux-x64 -o bin/linux/gitlab-ci-local && chmod +x bin/linux/gitlab-ci-local && gzip -c bin/linux/gitlab-ci-local > bin/linux.gz", - "pkg-macos": "pkg src/index.js --public -t macos-x64 -o bin/macos/gitlab-ci-local && gzip -c bin/macos/gitlab-ci-local > bin/macos.gz", - "pkg-all": "npm run pkg-linux && npm run pkg-macos", + "pkg-linux": "pkg src/index.js --public -t linux-x64 -o bin/linux/gitlab-ci-local && chmod +x bin/linux/gitlab-ci-local && gzip -c bin/linux/gitlab-ci-local > bin/linux.gz && rm -r bin/linux", + "pkg-macos": "pkg src/index.js --public -t macos-x64 -o bin/macos/gitlab-ci-local && gzip -c bin/macos/gitlab-ci-local > bin/macos.gz && rm -r bin/macos", + "pkg-win": "pkg src/index.js --public -t win-x64 -o bin/win/gitlab-ci-local && gzip -c bin/win/gitlab-ci-local.exe > bin/win.gz && rm -r bin/win", + "pkg-all": "npm run pkg-linux && npm run pkg-macos && npm run pkg-win", "pkg": "pkg", "build": "rm -f src/*.js src/*.d.ts && tsc", "check-all": "npm run build && npm run lint && npm run ncu && npm run coverage && npm run audit",