ci: add gitea quality workflow
All checks were successful
CI / Lint, typecheck and build (push) Successful in 11m26s
All checks were successful
CI / Lint, typecheck and build (push) Successful in 11m26s
This commit is contained in:
35
.gitea/workflows/ci.yml
Normal file
35
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
name: Lint, typecheck and build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: package-lock.json
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: npm run typecheck
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ out
|
|||||||
!.env.example
|
!.env.example
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
|||||||
@@ -23,12 +23,13 @@ Wymagany jest Node.js 20.9 lub nowszy.
|
|||||||
npm install
|
npm install
|
||||||
npm run dev
|
npm run dev
|
||||||
npm run lint
|
npm run lint
|
||||||
|
npm run typecheck
|
||||||
npm run build
|
npm run build
|
||||||
npm run start
|
npm run start
|
||||||
npm run notifications:worker
|
npm run notifications:worker
|
||||||
```
|
```
|
||||||
|
|
||||||
Repozytorium nie ma obecnie skryptu testów, osobnego skryptu type-check ani formattera. `npm run build` uruchamia kontrolę TypeScript wykonywaną przez Next.js. `npm run notifications:worker` uruchamia osobny proces Node do cyklicznego wywoływania endpointów Web Push na self-hostingu; wczytuje `.env` i `.env.local`, ale nadal wymaga równolegle działającego `npm run start` albo poprawnego `WTR_APP_URL`. Nie opisuj ani nie uruchamiaj nieistniejących komend jako standardowego workflow.
|
Repozytorium nie ma obecnie skryptu testów ani formattera. `npm run typecheck` uruchamia `tsc --noEmit`, a `npm run build` uruchamia produkcyjny build Next.js. `npm run notifications:worker` uruchamia osobny proces Node do cyklicznego wywoływania endpointów Web Push na self-hostingu; wczytuje `.env` i `.env.local`, ale nadal wymaga równolegle działającego `npm run start` albo poprawnego `WTR_APP_URL`. Nie opisuj ani nie uruchamiaj nieistniejących komend jako standardowego workflow.
|
||||||
|
|
||||||
## Konwencje kodu
|
## Konwencje kodu
|
||||||
|
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -63,11 +63,24 @@ Przykład znajduje się w [.env.example](.env.example).
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `npm run dev` | Uruchamia serwer deweloperski Next.js. |
|
| `npm run dev` | Uruchamia serwer deweloperski Next.js. |
|
||||||
| `npm run lint` | Uruchamia ESLint. |
|
| `npm run lint` | Uruchamia ESLint. |
|
||||||
|
| `npm run typecheck` | Uruchamia `tsc --noEmit`. |
|
||||||
| `npm run build` | Buduje aplikację produkcyjnie i uruchamia kontrolę TypeScript wykonywaną przez Next.js. |
|
| `npm run build` | Buduje aplikację produkcyjnie i uruchamia kontrolę TypeScript wykonywaną przez Next.js. |
|
||||||
| `npm run start` | Uruchamia zbudowaną aplikację. |
|
| `npm run start` | Uruchamia zbudowaną aplikację. |
|
||||||
| `npm run notifications:worker` | Uruchamia self-hostowany worker powiadomień. Wymaga działającej aplikacji Next.js. |
|
| `npm run notifications:worker` | Uruchamia self-hostowany worker powiadomień. Wymaga działającej aplikacji Next.js. |
|
||||||
|
|
||||||
Repozytorium nie ma obecnie osobnego skryptu testów, type-check ani formattera.
|
Repozytorium nie ma obecnie skryptu testów ani formattera.
|
||||||
|
|
||||||
|
## CI
|
||||||
|
|
||||||
|
Repozytorium używa Gitea Actions. Workflow znajduje się w [.gitea/workflows/ci.yml](.gitea/workflows/ci.yml) i uruchamia się przy pushu do `main` oraz przy pull requestach.
|
||||||
|
|
||||||
|
Pipeline działa na `ubuntu-latest`, instaluje zależności przez `npm ci`, a następnie uruchamia:
|
||||||
|
|
||||||
|
- `npm run lint`,
|
||||||
|
- `npm run typecheck`,
|
||||||
|
- `npm run build`.
|
||||||
|
|
||||||
|
Na instancji Gitea musi być włączony Actions runner kompatybilny z etykietą `ubuntu-latest`.
|
||||||
|
|
||||||
## Struktura Projektu
|
## Struktura Projektu
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ Przed zakończeniem zmian uruchamiaj:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run lint
|
npm run lint
|
||||||
|
npm run typecheck
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
Repozytorium nie ma obecnie osobnego skryptu testów, osobnego skryptu type-check ani formattera.
|
Repozytorium nie ma obecnie skryptu testów ani formattera.
|
||||||
|
|
||||||
## Bezpieczeństwo Zależności
|
## Bezpieczeństwo Zależności
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
"typecheck": "tsc --noEmit",
|
||||||
"notifications:worker": "node scripts/notification-worker.mjs"
|
"notifications:worker": "node scripts/notification-worker.mjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Reference in New Issue
Block a user