Skip to content

Commit

Permalink
feat: update .gitignore, modify server route handler, and add CI work…
Browse files Browse the repository at this point in the history
…flows
  • Loading branch information
productdevbook committed Dec 4, 2024
1 parent 175e9ce commit b212c81
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: autofix.ci
on:
pull_request:
push:
branches: [ "main" ]
paths:
- "!scripts/**"

permissions:
contents: read

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"
- run: pnpm install

- name: Fix lint issues
run: npm run lint:fix
- uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84
with:
commit-message: "fix: lint issues"
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

on:
push:
branches:
- main
paths-ignore:
- "docs/**"

pull_request:
branches:
- main
paths-ignore:
- "docs/**"


jobs:
build-test:
runs-on: ${{ matrix.os }}

permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write

strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 👀 Lint
run: pnpm lint

# - name: 👀 Typecheck
# run: pnpm typecheck

- name: 🚀 Build
run: pnpm build

# - name: 🧪 Test with coverage
# run: pnpm coverage

# - name: 📝 Upload coverage
# if: always()
# uses: davelosert/vitest-coverage-report-action@v2
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: lts/*

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ components.d.ts
.eslintcache
.nx
.vitest-cache
.data
2 changes: 1 addition & 1 deletion examples/nitro/server/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default eventHandler((event) => {
export default eventHandler(() => {
return 'Start by editing <code>server/routes/index.ts</code>.'
})
2 changes: 1 addition & 1 deletion examples/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nuxt-app",
"private": true,
"type": "module",
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
Expand Down

0 comments on commit b212c81

Please sign in to comment.