From b039ce69e96d1c6f85d3184576f2e8eba909ec0c Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 13:44:31 +0000 Subject: [PATCH 1/7] Add build and test workflow --- .github/workflows/pull-request.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pull-request.yaml diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 0000000..74940ba --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,23 @@ +name: Build and Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build From 65c62de02e2914f64619f95bb4baaaf64c8fc8a4 Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 13:49:36 +0000 Subject: [PATCH 2/7] Add build and test workflow --- .github/workflows/pull-request.yaml | 17 ++++++++++++----- tsconfig.json | 3 ++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 74940ba..d948ddd 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -7,14 +7,21 @@ on: branches: [ main ] jobs: - build: + build_and_test: + concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + runs-on: ubuntu-latest + steps: - - name: Check out repository - uses: actions/checkout@v3 + - name: Cloning repo + uses: actions/checkout@v4 - - name: Set up Node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm install diff --git a/tsconfig.json b/tsconfig.json index 34727db..91250f7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,8 @@ "outDir": "dist", "rootDir": "src", "strict": true, - "target": "es2019" + "target": "es2019", + "skipLibCheck": true }, "include": [ "src/**/*" From dbb235d2fa6bb2532162a90a3b72e01e1e01e938 Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 14:28:22 +0000 Subject: [PATCH 3/7] Add build and test workflow --- .github/actions/clone-install/action.yml | 16 ++++++++++++++++ .github/workflows/publish.yml | 10 ++-------- .../{pull-request.yaml => pull-request.yml} | 12 ++---------- 3 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 .github/actions/clone-install/action.yml rename .github/workflows/{pull-request.yaml => pull-request.yml} (52%) diff --git a/.github/actions/clone-install/action.yml b/.github/actions/clone-install/action.yml new file mode 100644 index 0000000..21e4129 --- /dev/null +++ b/.github/actions/clone-install/action.yml @@ -0,0 +1,16 @@ +name: "Clone and Install" +description: "Clones repository and sets up Node environment" +runs: + using: "composite" + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm install diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b752dd0..d2c480b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,15 +11,9 @@ jobs: name: Publish NPM Package steps: - - name: Cloning repo - uses: actions/checkout@v4 + - name: Clone and Install + uses: ./.github/actions/clone-install - - uses: actions/setup-node@v4 - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - - - run: npm i - run: npm run deploy env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yml similarity index 52% rename from .github/workflows/pull-request.yaml rename to .github/workflows/pull-request.yml index d948ddd..e2641a0 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yml @@ -15,16 +15,8 @@ jobs: runs-on: ubuntu-latest steps: - - name: Cloning repo - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: npm install + - name: Clone and Install + uses: ./.github/actions/clone-install - name: Build run: npm run build From 5fce107cb6371a8c6f5623d6484a9f51274dfcb5 Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 14:30:26 +0000 Subject: [PATCH 4/7] Add build and test workflow --- .github/actions/clone-install/action.yml | 3 --- .github/workflows/publish.yml | 3 +++ .github/workflows/pull-request.yml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/clone-install/action.yml b/.github/actions/clone-install/action.yml index 21e4129..dfb8500 100644 --- a/.github/actions/clone-install/action.yml +++ b/.github/actions/clone-install/action.yml @@ -3,9 +3,6 @@ description: "Clones repository and sets up Node environment" runs: using: "composite" steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Set up Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d2c480b..8fe3782 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,9 @@ jobs: name: Publish NPM Package steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Clone and Install uses: ./.github/actions/clone-install diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e2641a0..8feebc2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -15,6 +15,9 @@ jobs: runs-on: ubuntu-latest steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Clone and Install uses: ./.github/actions/clone-install From 08fc9da666caff07e26eff192f432e3ff46e3926 Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 14:32:55 +0000 Subject: [PATCH 5/7] add shell bash --- .github/actions/clone-install/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/clone-install/action.yml b/.github/actions/clone-install/action.yml index dfb8500..e926861 100644 --- a/.github/actions/clone-install/action.yml +++ b/.github/actions/clone-install/action.yml @@ -11,3 +11,4 @@ runs: - name: Install dependencies run: npm install + shell: bash From 932dc8a58e110470458bb53a2de0d590e0458212 Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 14:43:33 +0000 Subject: [PATCH 6/7] Update dependencies --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 46fcd42..c9c59e0 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ "/oclif.manifest.json" ], "dependencies": { - "@oclif/core": "^1.16.0", - "@oclif/plugin-help": "^5", - "@oclif/plugin-plugins": "^2.0.1", + "@oclif/core": "^1.26.2", + "@oclif/plugin-help": "^6.2.27", + "@oclif/plugin-plugins": "^5.4.36", "flagsmith": "^9.0.5", "node-fetch": "^2.6.6" }, @@ -27,19 +27,19 @@ "@oclif/test": "^2.1.1", "@types/chai": "^4", "@types/mocha": "^9.0.0", - "@types/node": "^16.9.4", - "@types/node-fetch": "^2.6.2", + "@types/node": "^18.19.83", + "@types/node-fetch": "^2.6.6", "chai": "^4", "eslint": "^7.32.0", "eslint-config-oclif": "^4", "eslint-config-oclif-typescript": "^1.0.2", "globby": "^11", - "mocha": "^9", - "oclif": "^3", + "mocha": "^11.1.0", + "oclif": "^4.17.41", "shx": "^0.3.3", "ts-node": "^10.2.1", "tslib": "^2.3.1", - "typescript": "4.4.4" + "typescript": "5.8.2" }, "oclif": { "bin": "flagsmith", From 7cae5cd920128e0b7dddf124815d61173508e27a Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 25 Mar 2025 14:45:49 +0000 Subject: [PATCH 7/7] Rename install action --- .github/actions/{clone-install => install}/action.yml | 0 .github/workflows/publish.yml | 2 +- .github/workflows/pull-request.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename .github/actions/{clone-install => install}/action.yml (100%) diff --git a/.github/actions/clone-install/action.yml b/.github/actions/install/action.yml similarity index 100% rename from .github/actions/clone-install/action.yml rename to .github/actions/install/action.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8fe3782..51d2862 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 - name: Clone and Install - uses: ./.github/actions/clone-install + uses: ./.github/actions/install - run: npm run deploy env: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8feebc2..aa85da8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Clone and Install - uses: ./.github/actions/clone-install + uses: ./.github/actions/install - name: Build run: npm run build