Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@qfall/pg
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ""
---

<!--
Thank you for filing a bug report! Please provide a short summary of the bug,
along with any information that might be required to replicate the bug, and if you already
found a solution / workaround, please provide it.

If you feel like any of the provided sections are not needed or should be extended,
feel free to adapt this form.
-->

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**

<!-- Steps to reproduce the behavior: -->
<!-- These steps are even more helpful if you provide some code for each step along the way using: -->

```rust
// write your code here
```

**Expected behavior**

<!-- A clear and concise description of what you expect to happen and
why the current behaviour does not match this criteria. -->

**Screenshots**

<!-- If applicable, add screenshots to help explain your problem. -->

**Desktop (please complete the following information):**

- OS: <!-- [e.g. iOS] -->
- Version of qFALL-schemes: <!-- [e.g. 1.0] -->

**Additional context**

<!-- Add any other context about the problem here. -->

**Solution**

<!-- If you already have a solution in mind, feel free to share it here. -->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Documentation
about: Report a problem with the documentation
title: ''
labels: "documentation"
assignees: ''

---

<!--
Thank you for filing a documentation issue!
As documentation issues can be quite versatile,
feel free to adapt this form in a way that you find best for it.
-->

**Documentation**

Type of documentation issue:
<!-- e.g. error in current documentation,
missing documentation, etc.-->

**Where can we find it**
<!-- Provide a description where we can find the documentation you are referring to, and possibly even screenshots-->

**Please describe what the current documentation is lacking**
<!-- Please explain what the issue with the current documentation is, e.g. missing, false, misleading, etc.-->

**Solution**
<!-- Do you have already have a solution to the proposed issue, if yes, please let us know here!-->
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

<!--
Thank you for filing a feature request! Please provide a short summary of the new
you need along with any information that might be required to understand the request.

If you feel like any of the provided sections are not needed or should be extended,
feel free to adapt this form.
-->
**Description**
<!-- Briefly describe the (new) feature, you would like to see implemented in this crate/ library. -->

**Motivation**
<!-- Why should this feature be implemented? Which new opportunities does it yield? Which (research) areas/ fields would be benefit from this feature? -->

**Best available solution**
<!--
A clear and concise description of how you expect this feature to be provided in the best possible case.
Think about how you want to use the new feature in your code, i.e. the API. Probably provide an example:
-->
```rust
// write your API call to the new feature here
```

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
38 changes: 38 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**Description**

<!--
Please include a summary of the changes and which issue is fixed or which feature it added.
Please also include relevant motivation and context. List any dependencies that are required for this change.
-->

This PR implements...
- [ ] feature/ revision/ hotfix/ optimisation/ ...

for/ of `Component`.

<!--
If Connected to an issue, include:
Closes #(issue number)
-->

**Testing**

<!-- Please shortly describe how you tested your code and mark all you have done after -->

<!-- exclude any of the following if they do not apply -->
- [ ] I added basic working examples (possibly in doc-comment)
- [ ] I triggered all possible errors in my test in every possible way
- [ ] I included tests for all reasonable edge cases
- [ ] I provided an intuition regarding how certain inputs have to be set
<!-- Please add other tests if any other have been performed -->

**Checklist:**

<!-- This is a short summary of the things the programmer should always consider before merging-->

- [ ] I have performed a self-review of my own code
- [ ] The code provides good readability and maintainability s.t. it fulfills best practices like talking code, modularity, ...
- [ ] The chosen implementation is not more complex than it has to be
- [ ] My code should work as intended and no side effects occur (e.g. memory leaks)
- [ ] The doc comments fit our style guide
- [ ] I have credited related sources if needed
89 changes: 89 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Pipeline

on:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "-Dwarnings"

jobs:
full_pipeline:
name: Full Pipeline
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup dtolnay/rust-toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt

# load project cache to reduce compilation time
- name: Setup project cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: release-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: release-${{ runner.os }}-cargo-

- name: Set environment variables
run: |
echo "PROJECT_NAME=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0] | [ .name ] | join("")')" >> $GITHUB_ENV
echo "PROJECT_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0] | [ .version ] | join("")')" >> $GITHUB_ENV

- name: Update dependencies
run: cargo update
- name: Build
run: cargo build --release
- name: Generate docs
run: cargo doc
- name: Run doc tests # Unit tests are run by tarpaulin
run: cargo test --doc --verbose

- name: Install cargo-tarpaulin
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-tarpaulin
- name: Calculate test coverage
run: cargo tarpaulin --out Html
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}-code_coverage_report-v${{ env.PROJECT_VERSION }}
path: tarpaulin-report.html

# Lints: Clippy and Fmt
- name: Clippy
run: cargo clippy -- -D warnings
- name: Format
run: cargo fmt --all -- --check

# Cargo check for security issues
- name: Install cargo-audit
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-audit
- name: Security audit
run: cargo audit

# Check for outdated dependencies
- name: Install cargo-outdated
uses: dtolnay/install@cargo-outdated
- name: Outdated dependencies
run: cargo outdated --exit-code 1

- name: Archive release build
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}-release_build-v${{ env.PROJECT_VERSION }}
path: target/release/${{ env.PROJECT_NAME }}
88 changes: 88 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Pipeline
# consistency regarding formatting and idiomatic Rust

on:
push:
branches:
- dev
pull_request:
branches:
- "**"

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "-Dwarnings"

jobs:
pipeline:
name: Pipeline - code coverage + dependency check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup dtolnay/rust-toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt

# load project cache to reduce compilation time
- name: Setup project cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Set environment variables
run: |
echo "PROJECT_NAME=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0] | [ .name ] | join("")')" >> $GITHUB_ENV
echo "PROJECT_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0] | [ .version ] | join("")')" >> $GITHUB_ENV

- name: Update dependencies
run: cargo update
- name: Build
run: cargo build
- name: Generate docs
run: cargo doc
- name: Run doc tests # Unit tests are run by tarpaulin
run: cargo test --doc --verbose

- name: Install cargo-tarpaulin
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-tarpaulin
- name: Calculate test coverage
run: cargo tarpaulin --out Html
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}-code_coverage_report-v${{ env.PROJECT_VERSION }}
path: tarpaulin-report.html

# Lints: Clippy and Fmt
- name: Clippy
run: cargo clippy -- -D warnings
- name: Format
run: cargo fmt --all -- --check

# Cargo check for security issues
- name: Install cargo-audit
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-audit
- name: Security audit
run: cargo audit

# Check for outdated dependencies
- name: Install cargo-outdated
uses: dtolnay/install@cargo-outdated
- name: Outdated dependencies
run: cargo outdated --exit-code 1
57 changes: 57 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Pipeline
# consistency regarding formatting and idiomatic Rust

on:
push:
branches-ignore:
- main
- dev

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "-Dwarnings"

jobs:
pipeline:
name: Pipeline - test and lints
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup dtolnay/rust-toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt

# load project cache to reduce compilation time
- name: Setup project cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Update dependencies
run: cargo update
- name: Build
run: cargo build
- name: Generate docs
run: cargo doc

- name: Test
run: cargo test --verbose

# Lints: Clippy and Fmt
- name: Clippy
run: cargo clippy -- -D warnings
- name: Format
run: cargo fmt --all -- --check

Loading
Loading