Skip to content

Commit c1a0660

Browse files
committed
Housekeeping
1 parent abb6bbd commit c1a0660

File tree

225 files changed

+5049
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+5049
-588
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. ...
16+
2. ...
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Screenshots**
22+
If applicable, add screenshots to help explain your problem.
23+
24+
**Platform (please complete the following information):**
25+
- OS: [e.g. iOS 17.2, macOS 14.2]
26+
- Device: [e.g. iPhone 15, MacBook Pro 16-inch 2021 M1 Pro]
27+
28+
**Additional context**
29+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context about the feature request here.

.github/codeql/codeql-config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
paths:
2+
- Sources
3+
- Tests
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Documentation CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: "ci-documentation-${{ github.head_ref || github.run_id }}"
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-documentation:
15+
name: Build Documentation
16+
runs-on: ubuntu-latest
17+
env:
18+
SWIFTCI_DOCC: 1
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Build
24+
run: swift package generate-documentation --product PoliceDataKit

.github/workflows/ci.yml

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
11
name: CI
22

33
on:
4-
push:
4+
pull_request:
55
branches:
66
- main
7-
pull_request:
7+
push:
88
branches:
99
- main
10+
paths:
11+
- ".github/workflows/ci.yml"
12+
- "**/*.swift"
1013
workflow_dispatch:
1114

1215
concurrency:
1316
group: "ci-${{ github.head_ref || github.run_id }}"
1417
cancel-in-progress: true
1518

1619
env:
17-
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
20+
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
1821

1922
jobs:
2023
build-test:
2124
name: Build and Test
22-
runs-on: macos-13
25+
runs-on: macos-14
2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@v3
26-
27-
- name: Cache SPM
28-
uses: actions/cache@v3
29-
with:
30-
path: .build
31-
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
32-
restore-keys: |
33-
${{ runner.os }}-spm-
34-
35-
- name: Lint
36-
run: swiftlint --strict --reporter github-actions-logging
28+
uses: actions/checkout@v4
3729

3830
- name: Build
3931
run: swift build -Xswiftc -warnings-as-errors --build-tests
@@ -43,27 +35,43 @@ jobs:
4335

4436
- name: Build for Release
4537
run: swift build -c release -Xswiftc -warnings-as-errors
46-
47-
build-documentation:
48-
name: Build Documentation
49-
runs-on: macos-13
38+
39+
build-and-test-platforms:
40+
name: Build and Test (${{ matrix.name }})
41+
runs-on: macos-14
42+
continue-on-error: true
43+
strategy:
44+
matrix:
45+
include:
46+
- name: iOS
47+
destination: platform=iOS Simulator,name=iPhone 15,OS=17.2
48+
- name: watchOS
49+
destination: platform=watchOS Simulator,name=Apple Watch Series 9 (45mm),OS=10.2
50+
- name: tvOS
51+
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=17.2
5052
steps:
5153
- name: Checkout
52-
uses: actions/checkout@v3
53-
54-
- name: Cache SPM
55-
uses: actions/cache@v3
56-
with:
57-
path: .build
58-
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
59-
restore-keys: |
60-
${{ runner.os }}-spm-
61-
62-
- name: Install markdownlint-cli
63-
run: brew install markdownlint-cli
54+
uses: actions/checkout@v4
6455

65-
- name: Lint DocC files
66-
run: markdownlint **/*.docc/**/*.md
56+
- name: Build
57+
run: set -o pipefail && env NSUnbufferedIO=YES && xcodebuild build-for-testing -scheme PoliceDataKit -only-testing PoliceDataKitTests -destination '${{ matrix.destination }}' | xcpretty
58+
59+
- name: Test
60+
run: set -o pipefail && env NSUnbufferedIO=YES && xcodebuild test-without-building -scheme PoliceDataKit -only-testing PoliceDataKitTests -destination '${{ matrix.destination }}' | xcpretty
61+
62+
build-test-linux:
63+
name: Build and Test (Linux)
64+
runs-on: ubuntu-latest
65+
container: swift:5.9.2-jammy
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
6769

6870
- name: Build
69-
run: swift package generate-documentation --product PoliceDataKit
71+
run: swift build -Xswiftc -warnings-as-errors --build-tests
72+
73+
- name: Test
74+
run: swift test --skip-build --parallel --filter PoliceDataKitTests
75+
76+
- name: Build for Release
77+
run: swift build -c release -Xswiftc -warnings-as-errors

.github/workflows/code-scan.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
# Every Sunday at 12am
12+
- cron: '0 0 * * 0'
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: "codeql-${{ github.head_ref || github.run_id }}"
17+
cancel-in-progress: true
18+
19+
env:
20+
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
runs-on: macos-14
26+
timeout-minutes: 120
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
with:
38+
languages: swift
39+
config-file: ./.github/codeql/codeql-config.yml
40+
41+
- name: Build
42+
run: swift build --build-tests
43+
44+
- name: Perform CodeQL Analysis
45+
uses: github/codeql-action/analyze@v3
46+
with:
47+
category: "/language:swift"

.github/workflows/documentation.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- ".github/workflows/documentation.yml"
9+
- "**/*.swift"
10+
- "**/*.docc/**/*.md"
711
workflow_dispatch:
812

913
permissions:
@@ -12,33 +16,20 @@ permissions:
1216
id-token: write
1317

1418
concurrency:
15-
group: "documentation"
16-
cancel-in-progress: false
17-
18-
env:
19-
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
19+
group: "deploy-documentation"
20+
cancel-in-progress: true
2021

2122
jobs:
22-
deploy:
23-
name: Deploy Documentation
24-
environment:
25-
name: github-pages
26-
url: ${{ steps.deployment.outputs.page_url }}documentation/policedatakit
27-
runs-on: macos-13
23+
build:
24+
name: Build
25+
runs-on: ubuntu-latest
26+
container: swift:5.9.2-jammy
2827
steps:
2928
- name: Checkout
30-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3130

3231
- name: Setup Pages
33-
uses: actions/configure-pages@v3
34-
35-
- name: Cache SPM
36-
uses: actions/cache@v3
37-
with:
38-
path: .build
39-
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
40-
restore-keys: |
41-
${{ runner.os }}-spm-
32+
uses: actions/configure-pages@v4
4233

4334
- name: Build documentation
4435
run: |
@@ -48,12 +39,22 @@ jobs:
4839
--transform-for-static-hosting \
4940
--hosting-base-path police-data-kit \
5041
--output-path docs
42+
env:
43+
SWIFTCI_DOCC: 1
5144

5245
- name: Upload documentation
53-
uses: actions/upload-pages-artifact@v1
46+
uses: actions/upload-pages-artifact@v3
5447
with:
5548
path: 'docs'
56-
49+
50+
deploy:
51+
name: Deploy
52+
runs-on: ubuntu-latest
53+
needs: build
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}documentation/policedatakit
57+
steps:
5758
- name: Deploy to GitHub Pages
5859
id: deployment
59-
uses: actions/deploy-pages@main
60+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)