Skip to content

Commit

Permalink
Update from hummingbird-project-template 6c7f44e2f7e58f2d298a177e7342…
Browse files Browse the repository at this point in the history
…1f244f41f90e (#32)

Co-authored-by: adam-fowler <adam-fowler@users.noreply.github.com>
  • Loading branch information
hummingbird-automation[bot] and adam-fowler authored Sep 18, 2024
1 parent 6e53697 commit 02bb8e6
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @adam-fowler @Joannis @thoven87
5 changes: 4 additions & 1 deletion .github/workflows/api-breakage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: API breaking changes

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

jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 15
container:
image: swift:5.10
image: swift:latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Validity Check

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

jobs:
validate:
Expand All @@ -15,6 +18,6 @@ jobs:
- name: Install Dependencies
run: |
brew install mint
mint install NickLockwood/SwiftFormat@0.51.15 --no-link
mint install NickLockwood/SwiftFormat@0.53.10 --no-link
- name: run script
run: ./scripts/validate.sh
35 changes: 35 additions & 0 deletions .github/workflows/verify-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Verify Documentation

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

jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 15
container:
image: swift:latest
steps:
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync bc
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
path: "package"
- name: Checkout
uses: actions/checkout@v4
with:
repository: "hummingbird-project/hummingbird-docs"
fetch-depth: 0
path: "documentation"
- name: Verify
run: |
cd documentation
swift package edit ${GITHUB_REPOSITORY#*/} --path ../package
./scripts/build-docc.sh -e
4 changes: 2 additions & 2 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Minimum swiftformat version
--minversion 0.51.0
--minversion 0.53.10

# Swift version
--swiftversion 5.9
Expand All @@ -8,7 +8,7 @@
--exclude .build

# rules
--disable redundantReturn, extensionAccessControl, typeSugar, conditionalAssignment
--disable redundantReturn, extensionAccessControl, typeSugar, conditionalAssignment, preferForLoop, redundantInternal, redundantStaticSelf

# format options
--ifdef no-indent
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ Please ensure to include the following in your Pull Request
- Documentation on how these changes are being tested
- Additional tests to show your code working and to ensure future changes don't break your code.

Remember the requirements for Hummingbird and HummingbirdCore (No Foundation and no new dependencies). If you are submitting a large change to a module (or bringing in a new dependency) please consider making these changes in a separate repository. The idea is that Hummingbird/HummingbirdCore are kept as slimline as possible. These concerns can be discussed in a Github Issue.

Please keep your PRs to a minimal number of changes. If a PR is large try to split it up into smaller PRs. Don't move code around unnecessarily it makes comparing old with new very hard.

The main development branch of the repository is `main`.

### Formatting

We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.51.15.
We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.53.10.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ================================
# Build image
# ================================
FROM swift:5.10 as build
FROM swift:6.0 as build

WORKDIR /build

Expand Down
15 changes: 14 additions & 1 deletion scripts/validate.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the Hummingbird server framework project
##
## Copyright (c) 2021-2024 the Hummingbird authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See hummingbird/CONTRIBUTORS.txt for the list of Hummingbird authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2019 Apple Inc. and the SwiftNIO project authors
Expand All @@ -13,7 +26,7 @@
##
##===----------------------------------------------------------------------===##

SWIFT_FORMAT_VERSION=0.51.15
SWIFT_FORMAT_VERSION=0.53.10

set -eu
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down

0 comments on commit 02bb8e6

Please sign in to comment.