From 4e0fbda7b34ac514ab93e29d5adf4507573265f5 Mon Sep 17 00:00:00 2001 From: mcasimir Date: Wed, 25 Aug 2021 16:51:16 +0200 Subject: [PATCH] add github actions --- .depcheckrc | 1 + .github/workflows/check-test.yaml | 33 +++++++++++++++++++++++++++++++ package-lock.json | 16 +-------------- package.json | 6 ++---- 4 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 .depcheckrc create mode 100644 .github/workflows/check-test.yaml diff --git a/.depcheckrc b/.depcheckrc new file mode 100644 index 0000000..68a8596 --- /dev/null +++ b/.depcheckrc @@ -0,0 +1 @@ +ignores: ["ts-node"] \ No newline at end of file diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml new file mode 100644 index 0000000..e106ffb --- /dev/null +++ b/.github/workflows/check-test.yaml @@ -0,0 +1,33 @@ +name: Check and Test + +on: + pull_request: + workflow_dispatch: + +jobs: + check-and-test: + name: Check and Test + runs-on: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Node.js Environment + uses: actions/setup-node@v2 + with: + node-version: ^14 + cache: 'npm' + + - name: Install npm@7 + run: npm install -g npm@7 + + - name: Install Dependencies + run: npm ci + + - name: Run Checks + run: npm run check + + - name: Run Tests + run: npm run test diff --git a/package-lock.json b/package-lock.json index c1cca52..4115eb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "name": "@mongodb-js/devtools-docker-test-envs", "version": "1.0.1", "dependencies": { - "debug": "^4.3.1", "eslint-plugin-mocha": "^9.0.0", "execa": "^5.1.1", "hostile": "^1.3.3", @@ -29,8 +28,7 @@ "mocha": "^9.0.3", "prettier": "^2.3.2", "ts-node": "^10.2.1", - "typescript": "^4.3.5", - "typescript-eslint": "^0.0.1-alpha.0" + "typescript": "^4.3.5" } }, "node_modules/@babel/code-frame": { @@ -3487,12 +3485,6 @@ "node": ">=4.2.0" } }, - "node_modules/typescript-eslint": { - "version": "0.0.1-alpha.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-0.0.1-alpha.0.tgz", - "integrity": "sha512-1hNKM37dAWML/2ltRXupOq2uqcdRQyDFphl+341NTPXFLLLiDhErXx8VtaSLh3xP7SyHZdcCgpt9boYYVb3fQg==", - "dev": true - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -6345,12 +6337,6 @@ "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", "dev": true }, - "typescript-eslint": { - "version": "0.0.1-alpha.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-0.0.1-alpha.0.tgz", - "integrity": "sha512-1hNKM37dAWML/2ltRXupOq2uqcdRQyDFphl+341NTPXFLLLiDhErXx8VtaSLh3xP7SyHZdcCgpt9boYYVb3fQg==", - "dev": true - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 8e9b23d..cebc9aa 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint": "eslint . && npm run prettier -- --check .", "reformat": "npm run prettier -- --write .", "depcheck": "depcheck .", - "check": "npm run lint && npm run depcheck", + "check": "npm run depcheck && npm run lint && npm run depcheck", "clean": "git clean --force -X --exclude node_modules", "precompile": "npm run clean", "compile": "npm run compile-ts", @@ -38,11 +38,9 @@ "mocha": "^9.0.3", "prettier": "^2.3.2", "ts-node": "^10.2.1", - "typescript": "^4.3.5", - "typescript-eslint": "^0.0.1-alpha.0" + "typescript": "^4.3.5" }, "dependencies": { - "debug": "^4.3.1", "eslint-plugin-mocha": "^9.0.0", "execa": "^5.1.1", "hostile": "^1.3.3",