Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer committed Jun 22, 2021
0 parents commit e8c6d23
Show file tree
Hide file tree
Showing 16 changed files with 738 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# *Name of the PR*

## :recycle: Current situation
*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*

### Implications
*Describe the implications, e.g. refactoring*

## :heavy_plus_sign: Additional Information
*Provide some additional information if possible*

### Related PRs
*Reference the related PRs*

### Testing
*Are there tests included? If yes, which situations are tested and which corner cases are missing?*

### Reviewer Nudging
*Where should the reviewer start, where is a good entry point?*
20 changes: 20 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
branches: [release]
name-template: '$NEXT_PATCH_VERSION'
tag-template: '$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## Changes
$CHANGES
90 changes: 90 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build and Test

on:
push:
branches:
- develop
- release
pull_request:
branches:
- develop
- release
workflow_dispatch:

jobs:
latest-beta-swift-version:
name: Latest (Beta) Swift Version
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/[email protected]
with:
xcode-version: latest
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
- name: Check Xcode version
run: xcodebuild -version
- name: Check Swift version
run: swift --version
- name: Debug Build & Test
run: swift test
macos:
name: macOS ${{ matrix.configuration }}
runs-on: macos-11
strategy:
fail-fast: false
matrix:
configuration: [debug, release, release_testing]
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/[email protected]
with:
xcode-version: latest-stable
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
- name: Check Xcode version
run: xcodebuild -version
- name: Check Swift version
run: swift --version
- 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 -Xswiftc -DRELEASE_TESTING
- name: Debug Build & Test
if: matrix.configuration == 'debug'
run: swift test -c debug --enable-code-coverage -Xswiftc -DCOVERAGE
- name: Convert coverage report
if: matrix.configuration == 'debug'
run: xcrun llvm-cov export -format="lcov" .build/debug/ApodiniTemplatePackageTests.xctest/Contents/MacOS/ApodiniTemplatePackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
linux:
name: Linux ${{ matrix.linux }} ${{ matrix.configuration }}
container:
image: swift:${{ matrix.linux }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
linux: [bionic, xenial, focal, amazonlinux2, centos8]
configuration: [debug, release]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-${{matrix.linux}}-spm-${{ hashFiles('Package.resolved') }}
- name: Check Swift version
run: swift --version
- name: Release Build
if: matrix.configuration == 'release'
run: swift build -c release
- name: Debug Build & Test
if: matrix.configuration == 'debug'
run: swift test -c debug
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Documentation

on:
release:
types: [published]

jobs:
deploy_docs:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/[email protected]
with:
xcode-version: latest
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
- name: Check Xcode version
run: xcodebuild -version
- name: Check Swift version
run: swift --version
- name: Publish Jazzy Docs
uses: steven0351/publish-jazzy-docs@v1
with:
personal_access_token: ${{ secrets.ACCESS_TOKEN }}
config: .jazzy.yml
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches:
- release

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Create Release

on:
push:
tags:
- '*.*.*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: GH Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/spm-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Swift Package Update

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

jobs:
createPR:
name: Create Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Swift version
run: swift --version
- name: Update Swift Packages
run: swift package update
- 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: PSchmiedmayer
committer: PSchmiedmayer <[email protected]>
author: PSchmiedmayer <[email protected]>
21 changes: 21 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: SwiftLint

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

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

19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Apodini .gitignore File

# Swift Package Manager
Package.resolved
*.xcodeproj
.swiftpm
.build/

# Xcode User settings
xcuserdata/

# Other files
.DS_Store

# Fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
7 changes: 7 additions & 0 deletions .jazzy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module: ApodiniTemplate
author: Paul Schmiedmayer
theme: fullwidth
output: ./docs
documentation: ./*.md
author_url: https://github.com/Apodini
github_url: https://github.com/Apodini/ApodiniTemplate
Loading

0 comments on commit e8c6d23

Please sign in to comment.