Skip to content
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
16 changes: 16 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,19 @@ jobs:
# Install dependencies
- name: 📦 Install dependencies
run: npm ci

# Setup PocketBase
- name: 🗄️ Download and setup PocketBase
run: npm run test:e2e:setup

# Start PocketBase
- name: 🚀 Start PocketBase
run: ./.pocketbase/pocketbase serve &

# Wait for PocketBase to be ready
- name: ⏳ Wait for PocketBase
run: |
until curl -s --fail http://localhost:8090/api/health; do
echo 'Waiting for PocketBase...'
sleep 5
done
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,30 @@ jobs:
- name: 🧪 Type check
run: npm run typecheck

# Run tests
- name: 🧪 Run unit tests
run: npm run test:unit

# Setup PocketBase
- name: 🗄️ Download and setup PocketBase
run: npm run test:e2e:setup

# Start PocketBase
- name: 🚀 Start PocketBase
run: ./.pocketbase/pocketbase serve &

# Wait for PocketBase to be ready
- name: ⏳ Wait for PocketBase
run: |
until curl -s --fail http://localhost:8090/api/health; do
echo 'Waiting for PocketBase...'
sleep 5
done

# Run tests
- name: 🧪 Run e2e tests
run: npm run test:e2e

# Create release
- name: 🚀 Create release
if: github.repository == 'pawcoding/astro-integration-pocketbase'
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: 🧪 Test code
# Run this on every push except master and next

on:
# Run this on every push except master and next
push:
branches:
- "**"
- "!master"
- "!next"
# Run this every week to make sure the latest PocketBase version still works
schedule:
- cron: "0 4 * * 6"

env:
HUSKY: 0
Expand Down Expand Up @@ -51,3 +55,27 @@ jobs:
# Type check
- name: 🧪 Type check
run: npm run typecheck

# Run tests
- name: 🧪 Run unit tests
run: npm run test:unit

# Setup PocketBase
- name: 🗄️ Download and setup PocketBase
run: npm run test:e2e:setup

# Start PocketBase
- name: 🚀 Start PocketBase
run: ./.pocketbase/pocketbase serve &

# Wait for PocketBase to be ready
- name: ⏳ Wait for PocketBase
run: |
until curl -s --fail http://localhost:8090/api/health; do
echo 'Waiting for PocketBase...'
sleep 5
done

# Run tests
- name: 🧪 Run e2e tests
run: npm run test:e2e
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# build output
dist/
.eslintcache
coverage/

# generated types
.astro/
Expand All @@ -24,3 +25,6 @@ pnpm-debug.log*

# jetbrains setting folder
.idea/

# PocketBase folder
.pocketbase/
14 changes: 12 additions & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
},
"rules": {
// Correctness (in addition to the default rules)
"typescript/no-base-to-string": "off",
"typescript/restrict-template-expressions": "off",
"typescript/unbound-method": "off",
"promise/no-new-statics": "error",
"promise/valid-params": "error",
// Perf
Expand Down Expand Up @@ -115,8 +118,8 @@
"eslint/no-redeclare": "error",
"eslint/no-self-compare": "error",
"eslint/no-throw-literal": "error",
"eslint/require-await": "warn",
"eslint/symbol-description": "error",
"typescript/ban-ts-comment": "warn",
"typescript/no-unsafe-argument": "error",
"typescript/no-unsafe-assignment": "error",
"typescript/no-unsafe-call": "error",
Expand Down Expand Up @@ -174,7 +177,6 @@
"promise/avoid-new": "warn",
"promise/no-nesting": "warn",
"promise/no-return-wrap": "error",
"promise/prefer-await-to-callbacks": "warn",
"promise/prefer-await-to-then": "warn",
"promise/prefer-catch": "warn",
"typescript/array-type": [
Expand Down Expand Up @@ -240,6 +242,14 @@
"eslint/max-lines": "off",
"eslint/max-lines-per-function": "off",
"eslint/max-nested-callbacks": "off",
"promise/avoid-new": "off",
"typescript/no-unsafe-argument": "off",
"typescript/no-unsafe-assignment": "off",
"typescript/no-unsafe-call": "off",
"typescript/no-unsafe-return": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/no-unsafe-type-assertion": "off",
"typescript/no-explicit-any": "off",
// Vitest specific rules
"vitest/no-import-node-test": "warn",
"vitest/prefer-to-be-falsy": "warn",
Expand Down
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* @type {import('lint-staged').Configuration}
*/
export default {
"!(*.ts)": "prettier --write",
"!(*.ts|*.ts.snap)": "prettier --write",
"*.ts": ["oxlint", "prettier --write"]
};
Loading