Skip to content

Commit

Permalink
Merge pull request #4 from vvvvise/feat/downgrade-node20.18.0
Browse files Browse the repository at this point in the history
chore[node]: downgrade to [email protected]
  • Loading branch information
sujii authored Dec 27, 2024
2 parents 192c27d + d88767e commit fd167bc
Show file tree
Hide file tree
Showing 9 changed files with 484 additions and 47 deletions.
22 changes: 0 additions & 22 deletions .eslintrc.js

This file was deleted.

52 changes: 39 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,63 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Corepack with Yarn/Berry
run: corepack enable && yarn init -2 && yarn set version stable

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
cache: 'yarn'

- name: Install dependencies
run: npm install
run: yarn install --mode=update-lockfile

- name: Run Lint
run: npx lint
run: npx eslint .

- name: Run Tests
run: npx vitest
run: npx vitest &

build:
name: Build Project
runs-on: ubuntu-latest
needs: test
name: Run Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
steps:
- name: Checkout code
uses: actions/checkout@v3

<<<<<<< HEAD
- name: Setup Corepack with Yarn/Berry
run: corepack enable && yarn init -2 && yarn set version stable

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
cache: 'yarn'

- name: Install dependencies
run: npm install
run: yarn install --mode=update-lockfile

- name: Install typescript, tsc
run: pwd && ls -alF

- name: Build Project
run: npx tsc
run: npx build
=======
- name: Setup Corepack with Yarn/Berry
run: corepack enable && yarn init -2 && yarn set version stable

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'

- name: Install dependencies
run: yarn install --mode=update-lockfile

- name: Build Project
run: yarn exec tsc --allowUnreachableCode --noCheck --project ./tsconfig.json
>>>>>>> 34f5ae982869911635f714097c7cb140da4fbd50
9 changes: 6 additions & 3 deletions .github/workflows/manual-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Corepack with Yarn/Berry
run: corepack enable && yarn init -2 && yarn set version stable

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
cache: 'yarn'

- name: Install dependencies
run: npm install
run: yarn install --mode=update-lockfile

- name: Build Project
run: npm tsc
run: npx tsc

- name: Deploy
run: echo "Deploying to ${{ github.event.inputs.environment }}..."
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Corepack with Yarn/Berry
run: corepack enable && yarn init -2 && yarn set version stable

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install dependencies
run: npm install
run: yarn install --mode=update-lockfile

- name: Build Project
run: npx tsc
Expand Down
Empty file added eslint.config.js
Empty file.
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,29 @@
"fs-extra": "^11.1.1",
"ofetch": "^1.4.1",
"readline": "^1.3.0",
"ts-node": "^10.9.1",
"tsc": "^2.0.4",
"typescript": ">=4.3.5 <5.4.0",
"vite": "^6.0.6",
"zod": "^3.24.1"
},
"devDependencies": {
"@changesets/cli": "^2.27.11",
"@types/node": "^20.6.1",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"ajv": "^8.17.1",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.0",
"prettier": "^3.0.0",
"ts-node": "^10.9.1",
"typescript": ">=4.3.5 <5.4.0",
"vitest": "^0.34.1"
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^0.34.1",
"vitest-sonar-reporter": "^2.0.0"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
},
"packageManager": "[email protected]"
}
13 changes: 13 additions & 0 deletions report/test-report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<testExecutions version="1">
<file path="tests/envManager.test.ts">
<testCase name="syncEnv - should successfully sync environment variables" duration="8" />
<testCase name="syncEnv - should throw error when GITHUB_TOKEN is not set" duration="2" />
<testCase name="syncEnv - should throw error when ENCRYPTION_KEY_ID is not set" duration="1" />
<testCase name="syncEnv - should handle API errors gracefully" duration="1" />
<testCase name="syncEnv - should use default repo values when not provided" duration="1" />
<testCase name="syncEnv - should handle concurrent API requests" duration="153" />
</file>
<file path="tests/list.test.ts">
<testCase name="Workflow Lister - should list ci.yml file in .github/workflows" duration="2" />
</file>
</testExecutions>
3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
plugins: [],
test: {
reporters: ["default", "vitest-sonar-reporter"],
outputFile: "report/test-report.xml",
globals: true,
environment: 'node',
coverage: {
Expand Down
Loading

0 comments on commit fd167bc

Please sign in to comment.