Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Modernise tooling #117

Draft
wants to merge 2 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI/CD

on:
push:
pull_request:
types: [opened, reopened]

env:
FORCE_COLOR: 3 # Diplay chalk colors

jobs:
ci:
# Watch out! When changing the job name,
# update the required checks in GitHub
# branch protection settings for `next`.
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Run integration tests
run: pnpm run ci
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
continue-on-error: true
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

cd:
name: Deployment
runs-on: ubuntu-latest
needs: [ci]
if: ${{ github.ref_name == 'main' || github.ref_name == 'beta' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Build package
run: pnpm build
- name: Semantic Release
run: ./node_modules/.bin/semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
pnpm commitlint --edit $1
4 changes: 0 additions & 4 deletions .husky/pre-push

This file was deleted.

1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.15.1
16 changes: 16 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
]
}
35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,41 +40,44 @@
"test:coverage:merge": "nyc merge ./coverage ./coverage/coverage-final.json",
"test:coverage:report": "nyc report -t ./coverage --r html -r lcov -r clover",
"ci": "run-s build test",
"prepare": "husky install",
"prepare": "husky",
"premigrate": "run-s build generate",
"migrate": "ts-node ./src/tests/migrate.ts"
},
"dependencies": {
"@47ng/cloak": "^1.1.0",
"@prisma/generator-helper": "^5.9.1",
"debug": "^4.3.4",
"immer": "^10.0.3",
"@47ng/codec": "^1.1.0",
"@prisma/generator-helper": "^5.17.0",
"debug": "^4.3.5",
"immer": "^10.1.1",
"object-path": "^0.11.8",
"zod": "^3.22.4"
"zod": "^3.23.8"
},
"peerDependencies": {
"@prisma/client": ">= 4.7"
},
"devDependencies": {
"@commitlint/config-conventional": "^17.8.1",
"@prisma/client": "5.9.1",
"@prisma/internals": "^5.9.1",
"@commitlint/config-conventional": "^19.2.2",
"@prisma/client": "5.17.0",
"@prisma/internals": "^5.17.0",
"@types/debug": "^4.1.12",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.16",
"@types/node": "^20.14.11",
"@types/object-path": "^0.11.4",
"commitlint": "^17.8.1",
"husky": "^9.0.10",
"jest": "^29",
"commitlint": "^19.3.0",
"husky": "^9.1.0",
"jest": "^29.7.0",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prisma": "^5.9.1",
"nyc": "^17.0.0",
"prisma": "^5.17.0",
"semantic-release": "^24.0.0",
"sqlite": "^5.1.1",
"sqlite3": "^5.1.7",
"ts-jest": "^29.1.2",
"ts-jest": "^29.2.2",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.5.3"
},
"packageManager": "[email protected]",
"jest": {
"verbose": true,
"preset": "ts-jest/presets/js-with-ts",
Expand Down
Loading
Loading