From 7e67dae3bf54935acb791e66a32032888a7052a5 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Thu, 3 Jun 2021 10:18:10 +0530 Subject: [PATCH] ci: use github actions and remove circleci --- .circleci/config.yml | 40 -------------------------------------- .github/stale.yml | 4 ++-- .github/workflows/test.yml | 39 +++++++++++++++++++++++++++++++++++++ .gitignore | 1 + .husky/.gitignore | 1 + .husky/commit-msg | 3 +++ LICENSE.md | 2 +- README.md | 6 +++--- appveyor.yml | 16 --------------- config.json | 7 +++---- package.json | 7 ------- 11 files changed, 53 insertions(+), 73 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yml create mode 100644 .husky/.gitignore create mode 100755 .husky/commit-msg delete mode 100644 appveyor.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 947b36a..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 2 -jobs: - build_14.15.4: - docker: - - image: circleci/node:14.15.4 - working_directory: ~/app - steps: - - checkout - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - - v1-dependencies- - - run: npm install - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - run: npm test - build_latest: - docker: - - image: circleci/node:latest - working_directory: ~/app - steps: - - checkout - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - - v1-dependencies- - - run: npm install - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - run: npm test -workflows: - version: 2 - workflow: - jobs: - - build_14.15.4 - - build_latest diff --git a/.github/stale.yml b/.github/stale.yml index f767674..7a6a571 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -6,10 +6,10 @@ daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - 'Type: Security' + - "Type: Security" # Label to use when marking an issue as stale -staleLabel: 'Status: Abandoned' +staleLabel: "Status: Abandoned" # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..51073d1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: test +on: + - push + - pull_request +jobs: + linux: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 14.15.4 + - 16.x + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install + run: npm install + - name: Run tests + run: npm test + windows: + runs-on: windows-latest + strategy: + matrix: + node-version: + - 14.15.4 + - 16.x + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install + run: npm install + - name: Run tests + run: npm test diff --git a/.gitignore b/.gitignore index 045e5cd..bc92e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ build dist shrinkwrap.yaml package-lock.json +test/__app diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..4654c12 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,3 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" +HUSKY_GIT_PARAMS=$1 node ./node_modules/@adonisjs/mrm-preset/validate-commit/conventional/validate.js diff --git a/LICENSE.md b/LICENSE.md index 3d7cd8d..47ca6df 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License -Copyright 2020 thetutlage, contributors +Copyright 2021 Harminder Virk, contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index a9e40f9..22f46d3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@
-[![circleci-image]][circleci-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url] [![synk-image]][synk-url] +[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url] [![synk-image]][synk-url]
@@ -209,8 +209,8 @@ export default transformerBefore(ts: typescript, appRoot: string) { } ``` -[circleci-image]: https://img.shields.io/circleci/project/github/adonisjs/require-ts/master.svg?style=for-the-badge&logo=circleci -[circleci-url]: https://circleci.com/gh/adonisjs/require-ts "circleci" +[gh-workflow-image]: https://img.shields.io/github/workflow/status/adonisjs/require-ts/test?style=for-the-badge +[gh-workflow-url]: https://github.com/adonisjs/require-ts/actions/workflows/test.yml "Github action" [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript [typescript-url]: "typescript" diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index b18338e..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -environment: - matrix: - - nodejs_version: Stable - - nodejs_version: 14.15.4 -init: git config --global core.autocrlf true -install: - - ps: Install-Product node $env:nodejs_version - - npm install -test_script: - - node --version - - npm --version - - npm run test -build: off -clone_depth: 1 -matrix: - fast_finish: true diff --git a/config.json b/config.json index 58cffe6..de28068 100644 --- a/config.json +++ b/config.json @@ -2,13 +2,12 @@ "core": true, "license": "MIT", "services": [ - "appveyor", - "circleci" + "github-actions" ], - "appveyorUsername": "thetutlage", "minNodeVersion": "14.15.4", "probotApps": [ "stale", "lock" - ] + ], + "runGhActionsOnWindows": true } diff --git a/package.json b/package.json index da873f8..158c4ab 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,6 @@ "@types/node": "^15.9.0", "@types/source-map-support": "^0.5.3", "benchmark": "^2.1.4", - "commitizen": "^4.2.4", - "cz-conventional-changelog": "^3.3.0", "del-cli": "^3.0.1", "eslint": "^7.27.0", "eslint-config-prettier": "^8.3.0", @@ -47,11 +45,6 @@ "ts-node": "^10.0.0", "typescript": "^4.3.2" }, - "husky": { - "hooks": { - "commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js" - } - }, "nyc": { "exclude": [ "test"