Skip to content
Merged
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/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deployment

on:
push:
tags:
- 'v*'
- '[0-9]*'

jobs:

create-docc-and-deploy:
uses: BinaryBirds/github-workflows/.github/workflows/docc_deploy.yml@main
permissions:
contents: read
pages: write
id-token: write
26 changes: 0 additions & 26 deletions .github/workflows/run-checks.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/run-tests.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Testing

on:
pull_request:
branches:
- main

jobs:

swiftlang_checks:
name: Swiftlang Checks
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "project"
format_check_enabled : true
broken_symlink_check_enabled : true
unacceptable_language_check_enabled : true
shell_check_enabled : true
docs_check_enabled : false
api_breakage_check_enabled : false
license_header_check_enabled : false
yamllint_check_enabled : false
python_lint_check_enabled : false

bb_checks:
name: BB Checks
if: ${{ github.actor != 'nektos/act' }}
uses: BinaryBirds/github-workflows/.github/workflows/extra_soundness.yml@main
with:
local_swift_dependencies_check_enabled : true
headers_check_enabled : true
docc_warnings_check_enabled : true

swiftlang_tests:
name: Swiftlang Tests
if: ${{ github.actor != 'nektos/act' }}
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
enable_windows_checks : false
linux_build_command: "swift test --parallel --enable-code-coverage"
linux_exclude_swift_versions: "[{\"swift_version\": \"5.8\"}, {\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"nightly\"}, {\"swift_version\": \"nightly-main\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"nightly-6.0\"}, {\"swift_version\": \"nightly-6.1\"}, {\"swift_version\": \"nightly-6.3\"}]"
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
.DS_Store
.build
.swiftpm
.vscode
Packages
*.xcodeproj
xcuserdata/
Package.resolved
db.sqlite
migration-entries.json
openapi.yaml
xcuserdata
DerivedData
.swiftpm
*.xctestplan
1 change: 1 addition & 0 deletions .swiftformatignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package.swift
13 changes: 13 additions & 0 deletions .swiftheaderignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.github/**
docker/**
AGENTS.md
.gitignore
.swift-format
.swiftformatignore
.swiftheaderignore
LICENSE
Makefile
Package.swift
Package.resolved
README.md
docker-compose.yaml
80 changes: 80 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Repository Guidelines

This repository contains an project written with Swift 6. Please follow the guidelines below so that the development experience is built on modern, safe API usage.


## Role

You are a **Senior Swift Engineer**, specializing in server-side Swift development, and related frameworks (Vapor, Hummingbird).


## Core instructions

- Swift 6.2 or later, using modern Swift concurrency.
- Do not introduce third-party frameworks without asking first.
- Avoid Foundation unless requested.
- Build system: Swift Package Manager.
- Testing framework: Swift Testing (`swift test`).


## Swift instructions

- Assume strict Swift concurrency rules are being applied.
- Prefer Swift-native alternatives to Foundation methods where they exist, such as using `replacing("hello", with: "world")` with strings rather than `replacingOccurrences(of: "hello", with: "world")`.
- Prefer modern Foundation API, if Foundation can not be avoided, for example `URL.documentsDirectory` to find the app’s documents directory, and `appending(path:)` to append strings to a URL.
- Never use C-style number formatting such as `Text(String(format: "%.2f", abs(myNumber)))`; always use `Text(abs(change), format: .number.precision(.fractionLength(2)))` instead.
- Prefer static member lookup to struct instances where possible, such as `.circle` rather than `Circle()`, and `.borderedProminent` rather than `BorderedProminentButtonStyle()`.
- Never use old-style Grand Central Dispatch concurrency such as `DispatchQueue.main.async()`. If behavior like this is needed, always use modern Swift concurrency.
- Avoid force unwraps and force `try` unless it is unrecoverable.
- Never use `Task.sleep(nanoseconds:)`; always use `Task.sleep(for:)` instead.


## Project structure

- Use a consistent project structure.
- Follow strict naming conventions for types, properties, methods, and data models.
- Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file.
- Write unit tests for core application logic.
- Add code comments and documentation comments as needed.
- If the project requires secrets such as API keys, never include them in the repository.


## Build, Test, and Development Commands

- Preferred workflow: after any code change run `swift build` to rebuild the project, and run `swift test` when you actually need tests.


## PR instructions

- If installed, make sure the `make format` & `make check` commands returns no warnings or errors before committing.


## Coding Style & Naming Conventions

- Enforce formatting with the `make format` command.
- Swift 6.2, prefer strict typing and small files (<500 LOC as a guardrail)
- Naming: types UpperCamelCase; methods/properties lowerCamelCase; tests mirror subject names; avoid abbreviations except common GitHub/API terms.


## Testing Guidelines

- Framework: Swift Testing via `swift test`. Name suites `<Thing>Tests` and functions `behavior()`.
- Cover new logic. Use deterministic fixtures/mocks for data.
- Run `swift test` before pushing; prefer adding tests alongside bug fixes.


## Commit & Pull Request Guidelines

- Commit messages follow the existing short, imperative style; optional scoped prefixes. Keep them concise; present tense; no trailing period.
- PRs: include a brief summary, linked issue ticket if any.


## Security & Configuration Tips

- Keep GitHub App secrets/private key out of the repo;
- Do not log tokens or traffic stats responses; prefer redacted diagnostics.


## Agent-Specific Notes

- Reminder: ignore files you do not recognize (just list them); multiple agents often work here.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2018-2022 Tibor Bödecs
Copyright (c) 2022-2024 Binary Birds Ltd.
Copyright (c) 2022-2026 Binary Birds Kft.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
47 changes: 33 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
SHELL=/bin/bash

build:
swift build
baseUrl = https://raw.githubusercontent.com/BinaryBirds/github-workflows/refs/heads/main/scripts

release:
swift build -c release

test:
swift test --parallel
check: symlinks language deps lint headers

symlinks:
curl -s $(baseUrl)/check-broken-symlinks.sh | bash

test-with-coverage:
swift test --parallel --enable-code-coverage
language:
curl -s $(baseUrl)/check-unacceptable-language.sh | bash

clean:
rm -rf .build
deps:
curl -s $(baseUrl)/check-local-swift-dependencies.sh | bash

check:
./scripts/run-checks.sh
lint:
curl -s $(baseUrl)/run-swift-format.sh | bash

format:
./scripts/run-swift-format.sh --fix
curl -s $(baseUrl)/run-swift-format.sh | bash -s -- --fix

docc-local:
curl -s $(baseUrl)/generate-docc.sh | bash -s -- --local

run-docc:
curl -s $(baseUrl)/run-docc-docker.sh | bash

docc-warnings:
curl -s $(baseUrl)/check-docc-warnings.sh | bash

headers:
curl -s $(baseUrl)/check-swift-headers.sh | bash

fix-headers:
curl -s $(baseUrl)/check-swift-headers.sh | bash -s -- --fix

test:
swift test --parallel

docker-test:
docker build -t feather-sqlite-database-tests . -f ./docker/tests/Dockerfile && docker run --rm feather-sqlite-database-tests
69 changes: 69 additions & 0 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading