Skip to content

Commit

Permalink
refactor: move scripts to ci (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: Almanov Nikita <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl committed Aug 18, 2024
1 parent 4839c95 commit 92e383b
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Auto Build
uses: github/codeql-action/autobuild@v3

- name: Perform Analysis
- name: Perform Code Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
2 changes: 1 addition & 1 deletion .github/workflows/editorconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:editorconfig
run: pnpm editorconfig-checker
13 changes: 5 additions & 8 deletions .github/workflows/eslint.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
name: ESLint

on:
workflow_run:
workflows:
- CodeQL
types:
- completed
pull_request:
branches:
- main
paths:
- src/**/*.ts
push:
branches:
- main
paths:
- src/**/*.ts

jobs:
eslint:
name: ESLint

if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -39,4 +36,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:ts
run: pnpm eslint src/**/*.ts
2 changes: 1 addition & 1 deletion .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:formatting
run: pnpm prettier . --check
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.RELEASE_UNBLOCKER_APP_ID }}
private_key: ${{ secrets.RELEASE_UNBLOCKER_APP_PRIVATE_KEY }}
app_id: ${{ secrets.ARCHOLEATER_APP_ID }}
private_key: ${{ secrets.ARCHOLEATER_APP_PRIVATE_KEY }}

- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -55,4 +55,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: pnpm release
run: pnpm semantic-release
2 changes: 1 addition & 1 deletion .github/workflows/remark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:md
run: pnpm remark . --quiet --frail
13 changes: 5 additions & 8 deletions .github/workflows/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
name: Spec

on:
workflow_run:
workflows:
- ESLint
types:
- completed
pull_request:
branches:
- main
paths:
- src/**/*.ts
push:
branches:
- main
paths:
- src/**/*.ts

jobs:
spec:
name: Spec

if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -39,4 +36,4 @@ jobs:
run: pnpm i

- name: Specs
run: pnpm spec
run: pnpm vitest
3 changes: 1 addition & 2 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export default {
'**/*.md': 'remark --quiet --frail',
'**/*': 'prettier --write',
'*': 'prettier --write',
'src/**/*.ts': 'eslint --fix',
};
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,7 @@
],
"scripts": {
"init": "pnpm i && husky",
"spec": "vitest",
"spec:coverage": "vitest run --coverage",
"build": "rollup -c rollup.config.ts --configPlugin typescript",
"release": "semantic-release",
"lint:editorconfig": "editorconfig-checker",
"lint:formatting": "prettier . --check",
"lint:md": "remark . --quiet --frail",
"lint:ts": "eslint src/**/*.ts --fix",
"prettify": "prettier . --write"
"build": "rollup -c rollup.config.ts --configPlugin typescript"
},
"peerDependencies": {
"eslint": "^8.0.0 || ^9.0.0"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"#shared": ["./src/shared/index.ts"]
},
"rootDir": "src",
"types": ["eslint", "node", "vitest"],
"types": ["node", "vitest"],
// Projects
"disableReferencedProjectLoad": true
}
Expand Down

0 comments on commit 92e383b

Please sign in to comment.