-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,172 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Describe the bug | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
## Minimal Reproducible Examples (MRE) | ||
|
||
Please try to provide information which will help us to fix the issue faster. MREs with few dependencies are especially lovely <3. | ||
|
||
If applicable, add logs/screenshots to help explain your problem. | ||
|
||
**Environment (please complete the following information):** | ||
- Platform: [e.g.`uname -a`] | ||
- Rust [e.g.`rustic -vV`] | ||
- Cargo [e.g.`cargo -vV`] | ||
|
||
## Additional context | ||
|
||
Add any other context about the problem here. For example, environment variables like `CARGO`, `RUSTUP_HOME` or `CARGO_HOME`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Problem | ||
|
||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
Include Issue links if they exist. | ||
|
||
Minimal Reproducible Examples (MRE) with few dependencies are useful. | ||
|
||
## Solution | ||
|
||
A clear and concise description of what you want to happen. | ||
|
||
## Alternatives | ||
|
||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
## Additional context | ||
|
||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Specification Non-conformance report | ||
about: Report an error in our implementation | ||
title: '' | ||
labels: specification | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Describe the bug | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
Please include references to the relevant specification; for example: | ||
|
||
> RFC 2616, section 4.3.2: | ||
> | ||
> > The HEAD method is identical to GET except that the server MUST NOT | ||
> > send a message body in the response | ||
## Minimal Reproducible Examples (MRE) | ||
|
||
Please try to provide information which will help us to fix the issue faster. MREs with few dependencies are especially lovely <3. | ||
|
||
## Additional context | ||
|
||
Add any other context about the problem here. For example, any other specifications that provide additional information, or other implementations that show common behavior. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,273 @@ | ||
name: Rust | ||
|
||
on: [push] | ||
on: | ||
pull_request: | ||
paths: | ||
- '**' | ||
- '!/*.md' | ||
- '!/*.org' | ||
- "!/LICENSE" | ||
|
||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**' | ||
- '!/*.md' | ||
- '!/*.org' | ||
- "!/LICENSE" | ||
|
||
schedule: | ||
- cron: '12 12 12 * *' | ||
|
||
jobs: | ||
build: | ||
publish: | ||
name: Publish (dry-run) | ||
needs: [test, docs] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
package: | ||
- email_address | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Check publish | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: publish | ||
args: --package ${{ matrix.package}} --dry-run | ||
|
||
|
||
check_tests: | ||
name: Check for test types | ||
runs-on: ubuntu-latest | ||
outputs: | ||
has_benchmarks: ${{ steps.check_benchmarks.outputs.has_benchmarks }} | ||
has_examples: ${{ steps.check_examples.outputs.has_examples }} | ||
steps: | ||
- name: Check for benchmarks | ||
id: check_benchmarks | ||
run: test -d benchmarks && echo "has_benchmarks=1" || echo "has_benchmarks=" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Check for examples | ||
id: check_examples | ||
run: test -d examples && echo "has_examples=1" || echo "has_examples=" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
|
||
test: | ||
name: Test | ||
needs: [rustfmt, clippy] | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
rust: ["stable", "beta", "nightly"] | ||
test-features: ["", "--all-features", "--no-default-features"] | ||
continue-on-error: ${{ matrix.rust != 'stable' }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --workspace ${{ matrix.test-features }} | ||
|
||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --workspace ${{ matrix.test-features }} | ||
|
||
|
||
benchmarks: | ||
name: Benchmarks | ||
needs: [rustfmt, clippy, check_tests] | ||
if: needs.check_tests.outputs.has_benchmarks | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
rust: ["stable"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Run benchmarks with all features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --workspace --benches --all-features --no-fail-fast | ||
|
||
|
||
examples: | ||
name: Examples | ||
needs: [rustfmt, clippy, check_tests] | ||
if: needs.check_tests.outputs.has_examples | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
rust: ["stable"] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Run examples with all features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --workspace --examples --all-features --no-fail-fast | ||
|
||
- name: Install dependencies | ||
run: rustup component add rustfmt | ||
|
||
coverage: | ||
name: Code Coverage | ||
needs: test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
rust: ["stable"] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
|
||
- name: Run cargo-tarpaulin | ||
uses: actions-rs/[email protected] | ||
with: | ||
version: 0.22.0 | ||
args: --all-features -- --test-threads 1 | ||
|
||
- name: Format | ||
run: cargo fmt -- --check | ||
- name: Upload to codecov.io | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
|
||
- name: Build | ||
run: cargo build --verbose | ||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: code-coverage-report | ||
path: cobertura.xml | ||
|
||
- name: Run tests | ||
run: cargo test --all-features --verbose | ||
|
||
docs: | ||
name: Document generation | ||
needs: [rustfmt, clippy] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Generate documentation | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
with: | ||
command: doc | ||
args: --workspace --all-features --no-deps | ||
|
||
|
||
rustfmt: | ||
name: rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
components: rustfmt | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Docs | ||
run: cargo doc --no-deps | ||
- name: Check formatting | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
components: clippy | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --workspace --no-deps --all-features --all-targets -- -D warnings |
Oops, something went wrong.