From e05e789fa3519307ce6d95dcc777f0113e563d0c Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:47:31 +0530 Subject: [PATCH 1/2] Fixes broken test suite --- package.json | 2 +- utils/constants.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 165904d1c..e7f7277a1 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Register *.is-a.dev domains for free", "scripts": { - "test": "jest", + "test": "ENV=test jest", "publish-records": "yarn test && node ./scripts/register-domains.js" }, "repository": { diff --git a/utils/constants.js b/utils/constants.js index 0c0e43bfe..89a9b627f 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -8,12 +8,14 @@ if (!CI) { const { NC_USER, NC_API_KEY, NC_DOMAIN, IP_ADDRESS } = process.env; +const IS_TEST = ENV === 'test'; + module.exports = { ENV, VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'], NC_DOMAIN: NC_DOMAIN || 'booboo.xyz', - NC_USER, - NC_API_KEY, + NC_USER: IS_TEST ? 'testuser' : NC_USER, + NC_API_KEY: IS_TEST ? 'testkey' : NC_API_KEY, IP_ADDRESS, TTL: 5*60, }; From da136756b25f0bb3507ee3b745b120bd384f1c8a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:49:49 +0530 Subject: [PATCH 2/2] Labeler path changes --- .github/labeler.yml | 2 +- .github/workflows/checks.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1583ed54d..7dc30bf5a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -3,4 +3,4 @@ domain: documentation: - ./*.md - - docs/*.md + - ./**/*.md diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 249415639..e8519241f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -19,6 +19,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Labelling pull request - uses: actions/labeler@v2 + uses: actions/labeler@main with: - repo-token: "${{secrets.GITHUB_TOKEN}}" + repo-token: "${{ secrets.GITHUB_TOKEN }}"