Skip to content

Commit e2623aa

Browse files
committed
ci: Create Unit Tests
1 parent 1103c53 commit e2623aa

Some content is hidden

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

65 files changed

+1822
-611
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
### Bug Report
2+
3+
**Describe the bug:**
4+
5+
A clear and concise description of what the bug is.
6+
7+
**To Reproduce:**
8+
9+
Steps to reproduce the behavior:
10+
11+
1. Go to '...'
12+
2. Click on '...'
13+
3. Scroll down to '...'
14+
4. See error
15+
16+
**Expected behavior:**
17+
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots/Code Snippets (Optional):**
21+
22+
If applicable, add screenshots or code snippets to help explain your problem.
23+
24+
**Environment:**
25+
26+
- Library Version: [e.g., 1.0.0]
27+
- Swift Version: [e.g., 5.8]
28+
- Xcode Version: [e.g., 14.3]
29+
- Operating System: [e.g., macOS 13.4]
30+
31+
### Additional Information
32+
33+
Any other information you would like to share?

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Documentation Improvement
2+
3+
**Describe the issue:**
4+
5+
Where in the documentation is the problem? What is unclear or incorrect?
6+
7+
**Proposed solution:**
8+
9+
How would you improve the documentation? Please provide specific suggestions.
10+
11+
**Relevant files:**
12+
13+
Please specify the documentation files that need to be changed.
14+
15+
### Additional Information
16+
17+
Any other information you would like to share?
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Feature Request
2+
3+
**Describe the proposed feature:**
4+
5+
A clear and concise description of the feature you would like to see.
6+
7+
**Describe the benefits of the feature:**
8+
9+
Why would this feature be useful? What problems does it solve?
10+
11+
**Possible implementation (Optional):**
12+
13+
If you have any ideas on how this feature could be implemented, please share them.
14+
15+
### Additional Information
16+
17+
Any other information you would like to share?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes # (issue number)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
## How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
23+
## Checklist:
24+
25+
- [ ] My code follows the style guidelines of this project
26+
- [ ] I have performed a self-review of my own code
27+
- [ ] I have commented my code, particularly in hard-to-understand areas
28+
- [ ] I have made corresponding changes to the documentation
29+
- [ ] My changes generate no new warnings
30+
- [ ] I have added tests that prove my fix is effective or that my feature works
31+
- [ ] New and existing unit tests pass locally with my changes
32+
- [ ] Any dependent changes have been merged and published in downstream modules.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Swift Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: macos-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Select Xcode version
16+
uses: maxim-lobanov/setup-xcode@v1
17+
with:
18+
xcode-version: '16.1.0'
19+
- name: List Xcode Versions
20+
run: xcodebuild -showsdks
21+
- name: Run tests
22+
run: swift test

.github/workflows/swiftlint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: SwiftLint
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
swiftlint:
11+
runs-on: macos-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Install Homebrew (if needed)
18+
run: |
19+
if ! which brew > /dev/null; then
20+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
21+
echo "HOMEBREW_PREFIX=/opt/homebrew" >> $GITHUB_ENV
22+
echo "HOMEBREW_ROOT=/opt/homebrew" >> $GITHUB_ENV
23+
echo "/opt/homebrew/bin" >> $GITHUB_PATH
24+
fi
25+
26+
- name: Update Homebrew and Install SwiftLint
27+
run: |
28+
brew update
29+
brew install swiftlint
30+
31+
- name: Run SwiftLint
32+
run: swiftlint --strict

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ DerivedData/
66
.swiftpm/configuration/registries.json
77
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
88
.netrc
9+
.swiftpm/

CONTRIBUTING.md

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,46 @@
1-
# Contributing to Astroject
2-
Contributions are welcome! Please feel free to submit pull requests or open issues via these guidelines.
1+
# Contributors
32

4-
## Creating Issues
5-
// TODO
3+
We appreciate all contributions to this Swift library! This document recognizes the individuals and groups who have helped make this project better.
64

7-
## Creating Pull Requests
8-
// TODO
5+
## Thank You!
6+
7+
We extend a huge thank you to everyone who has contributed to this project, whether through bug reports, feature suggestions, documentation improvements, or code contributions. Your efforts are invaluable!
8+
9+
## How Contributions Are Recognized
10+
11+
* **Version Tags:** When a new version of the library is deployed, we will acknowledge the contributions made in the release notes associated with the tag.
12+
* **Commit Messages:** Individual contributions are also recognized in the commit messages of the repository.
13+
* **Maintainer Vetting:** Individuals interested in becoming maintainers will go through a vetting process.
14+
15+
## Contributors
16+
17+
Here's a list of our contributors (alphabetical order):
18+
19+
* [Porter McGary](https://github.com/mcgaryp)
20+
21+
## Maintainers
22+
23+
The following individuals are the current maintainers of this project:
24+
25+
* [Porter McGary](https://github.com/mcgaryp)
26+
27+
## Contribution Guidelines
28+
29+
We encourage contributions that align with the goals of this library. Please adhere to the following guidelines:
30+
31+
* Follow the coding style enforced by SwiftLint.
32+
* Submit bug reports and feature suggestions through GitHub issues.
33+
* Contribute to documentation to improve clarity and completeness.
34+
* All contributions are subject to the project's MIT License.
35+
36+
## Future Maintainers
37+
38+
If you are interested in becoming a maintainer, please open an issue to express your interest. You will then be vetted by the current maintainers.
39+
40+
## Note on Bots
41+
42+
While we appreciate the efficiency of bots, we currently track contributions manually via commit messages and release tags. If a free and suitable bot solution becomes available, we will consider implementing it.
43+
44+
---
45+
46+
This `CONTRIBUTORS.md` file is subject to change as the project evolves.

Package.swift

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ let package = Package(
77
name: "Astroject",
88
platforms: [
99
.iOS(.v16),
10-
.macOS(.v13)
10+
.macOS(.v13),
11+
.tvOS(.v16),
12+
.watchOS(.v9),
13+
.visionOS(.v1)
1114
],
1215
products: [
13-
// Products define the executables and libraries a package produces, making them visible to other packages.
14-
.library(
15-
name: "Astroject",
16-
targets: ["Astroject"]),
16+
.library(name: "Astroject", targets: ["Core"]),
17+
.library(name: "Astroject-Nexus", targets: ["Nexus"]),
18+
.library(name: "Astroject-Singularity", targets: ["Singularity"])
1719
],
1820
targets: [
19-
// Targets are the basic building blocks of a package, defining a module or a test suite.
20-
// Targets can depend on other targets in this package and products from dependencies.
21-
.target(
22-
name: "Astroject"),
23-
.testTarget(
24-
name: "AstrojectTests",
25-
dependencies: ["Astroject"]
26-
),
21+
.target(name: "Core"),
22+
.target(name: "Nexus", dependencies: ["Core"]),
23+
.target(name: "Singularity", dependencies: ["Core"]),
24+
25+
.testTarget(name: "CoreTests", dependencies: ["Core"]),
26+
.testTarget(name: "NexusTests", dependencies: ["Nexus"]),
27+
.testTarget(name: "SingularityTests", dependencies: ["Singularity"]),
2728
]
2829
)

0 commit comments

Comments
 (0)