Skip to content

Commit

Permalink
Update to Apodini 0.4.0, Make REUSE compliant (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer authored Aug 24, 2021
1 parent 29ef881 commit 97d9d39
Show file tree
Hide file tree
Showing 85 changed files with 2,673 additions and 464 deletions.
22 changes: 15 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
<!--
This source file is part of the Collector-Analyst-Presenter Example open source project
SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
SPDX-License-Identifier: MIT
-->

# *Name of the PR*

## :recycle: Current situation
## :recycle: Current situation & Problem
*Describe the current situation (if possible with and exemplary (or real) code snippet and/or where this is used)*

## :bulb: Proposed solution
*Describe the solution (if possible with and exemplary (or real) code snippet)*

### Problem that is solved
*Provide a description and link issues that are solved*
*Describe the solution and how this affects the project and internal structure*

### Implications
*Describe the implications, e.g. refactoring*
## :gear: Release Notes
*Add a short summary of the feature as well as possible migration guides if this is a breaking change so this section can be added to the release notes.*
*Include code snippets that provide examples of the feature implemented if it appends or changes the public interface.*

## :heavy_plus_sign: Additional Information
*Provide some additional information if possible*
Expand Down
20 changes: 15 additions & 5 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

branches: [release]
name-template: '$NEXT_PATCH_VERSION'
tag-template: '$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
- title: 'Semantic Version Major'
labels:
- 'needs version bump'
- title: 'Semantic Version Minor'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- title: 'Other Changes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
- 'documentation'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## Changes
$CHANGES
$CHANGES
53 changes: 41 additions & 12 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: Build and Test

on:
Expand All @@ -7,14 +15,12 @@ on:
pull_request:
branches:
- develop
workflow_dispatch:

jobs:
macosclient:
name: macOS Client
runs-on: macos-11
defaults:
run:
working-directory: ./Client
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/[email protected]
Expand All @@ -27,34 +33,46 @@ jobs:
- name: Build and test
run: xcodebuild test -scheme Example -destination 'platform=iOS Simulator,OS=15.0,name=iPhone 12'
macoswebservices:
name: macOS ${{ matrix.webservice }}
name: macOS ${{ matrix.webservice }} ${{ matrix.configuration }}
runs-on: macos-11
strategy:
fail-fast: false
matrix:
webservice: [Gateway, Database, Processing]
configuration: [debug, release]
defaults:
run:
working-directory: ./${{ matrix.webservice }}
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1.1
- uses: maxim-lobanov/setup-xcode@v1.2.3
with:
xcode-version: latest
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-${{ matrix.webservice }}-spm-${{ hashFiles('**/Package.resolved') }}
- name: Check Xcode version
run: xcodebuild -version
- name: Check Swift version
run: swift --version
- name: Build and test
run: swift test
- name: Release Build
if: matrix.configuration == 'release'
run: swift build -c release
- name: Debug Build
if: matrix.configuration == 'debug'
run: swift build -c debug
linuxwebservices:
name: Linux ${{ matrix.webservice }} ${{ matrix.linux }}
name: Linux ${{ matrix.webservice }} ${{ matrix.linux }} ${{ matrix.configuration }}
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.linux }}
image: swiftlang/swift:nightly-5.5-${{ matrix.linux }}
strategy:
fail-fast: false
matrix:
webservice: [Gateway, Database, Processing]
linux: [latest, focal, amazonlinux2, centos8]
linux: [bionic, focal, amazonlinux2, centos8]
configuration: [debug, release, release_testing]
defaults:
run:
working-directory: ./${{ matrix.webservice }}
Expand All @@ -69,7 +87,18 @@ jobs:
- name: Install libsqlite3
if: startsWith( matrix.linux, 'centos' )
run: yum update -y --nobest && yum install -y sqlite-devel
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-${{matrix.linux}}-${{ matrix.webservice }}-spm-${{ hashFiles('Package.resolved') }}
- name: Check Swift version
run: swift --version
- name: Build and test
run: swift test
- name: Release Build
if: matrix.configuration == 'release'
run: swift build -c release
- name: Release Build & Test
if: matrix.configuration == 'release_testing'
run: swift test -c release -Xswiftc -enable-testing
- name: Debug Build & Test
if: matrix.configuration == 'debug'
run: swift test -c debug
8 changes: 8 additions & 0 deletions .github/workflows/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: Build Docker Compose

on:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: Build Docker Image

on:
push:
tags:
- '*.*.*'
release:
types: [published]
workflow_dispatch:

jobs:
docker:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: Release Drafter

on:
push:
branches:
- release
- develop

jobs:
update_release_draft:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: Create Release

on:
Expand All @@ -9,7 +17,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: GH Release
- name: Create GitHub Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/reuseaction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: REUSE Compliance Check

on:
pull_request:
workflow_dispatch:

jobs:
reuse:
name: REUSE Compliance Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
48 changes: 48 additions & 0 deletions .github/workflows/spm-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: Swift Package Update

on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
createPR:
name: Create Pull Request
container:
image: swiftlang/swift:nightly-5.5-focal
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Swift version
run: swift --version
- name: Update Swift Packages Gateway
run: cd ./Gateway && swift package update
- name: Update Swift Packages Database
run: cd ./Database && swift package update
- name: Update Swift Packages Processing
run: cd ./Processing && swift package update
- name: Update Swift Packages Xcode Projekt
run: |
rm -f Example.xcworkspace/xcshareddata/swiftpm/Package.resolved
xcodebuild -resolvePackageDependencies
- uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
commit-message: Update dependencies
title: Update dependencies
body: Update the Swift Package dependencies.
delete-branch: true
base: develop
branch: bots/update-dependencies
assignees: ApodiniBot
committer: ApodiniBot <[email protected]>
author: ApodiniBot <[email protected]>
reviewers: PSchmiedmayer
17 changes: 11 additions & 6 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

name: SwiftLint

on:
pull_request:
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
workflow_dispatch:

jobs:
swiftlint:
name: SwiftLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.1.0
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}

23 changes: 17 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#

# Apodini .gitignore File

# Swift Package Manager
.build/
Package.resolved
*.xcodeproj
!Client/Example.xcodeproj
**/.swiftpm
**/.build/

# IDE related folders
.idea

# Xcode User settings
xcuserdata/

# Xcode build
build/

# Other files
.DS_Store
.DS_Store
.env
Loading

0 comments on commit 97d9d39

Please sign in to comment.