Misc repo setup (#7)

This commit is contained in:
David Pedersen
2021-06-12 20:18:21 +02:00
committed by GitHub
parent c91dc7ce29
commit 002e3f92b3
13 changed files with 579 additions and 462 deletions
+53
View File
@@ -0,0 +1,53 @@
---
name: 🐛 Bug Report
about: If something isn't working as expected 🤔.
---
## Bug Report
<!--
Thank you for reporting an issue.
Please fill in as much of the template below as you're able.
-->
### Version
<!--
List the versions of all `tower-web` crates you are using. The easiest way to get
this information is using `cargo tree`:
`cargo tree | grep tower-web`
-->
### Platform
<!---
Output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
-->
### Crates
<!--
If known, please specify the affected tower-web crates. Otherwise, delete this
section.
-->
### Description
<!--
Enter your issue details below this comment.
One way to structure the description:
<short summary of the bug>
I tried this code:
<code sample that causes the bug>
I expected to see this happen: <explanation>
Instead, this happened: <explanation>
-->
+28
View File
@@ -0,0 +1,28 @@
---
name: 💡 Feature Request
about: I have a suggestion (and may want to implement it 🙂)!
---
## Feature Request
### Motivation
<!--
Please describe the use case(s) or other motivation for the new feature.
-->
### Proposal
<!--
How should the new feature be implemented, and why? Add any considered
drawbacks.
-->
### Alternatives
<!--
Are there other ways to solve this problem that you've considered? What are
their potential drawbacks? Why was the proposed solution chosen over these
alternatives?
-->
+23
View File
@@ -0,0 +1,23 @@
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.
Bug fixes and new features should include tests.
Contributors guide: https://github.com/davidpdrsn/tower-web/blob/master/CONTRIBUTING.md
-->
## Motivation
<!--
Explain the context and why you're making that change. What is the problem
you're trying to solve? If a new feature is being added, describe the intended
use case that feature fulfills.
-->
## Solution
<!--
Summarize the solution and provide any necessary context needed to understand
the code change.
-->
+72
View File
@@ -0,0 +1,72 @@
name: CI
on:
push:
branches:
- master
pull_request: {}
jobs:
check:
# Run `cargo check` first to ensure that the pushed code at least compiles.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, 1.40.0]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
- name: Check
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --all-targets --all-features
- name: rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
cargo-hack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install cargo-hack
run: |
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: cargo hack check
working-directory: ${{ matrix.subcrate }}
run: cargo hack check --each-feature --no-dev-deps --all
test-versions:
# Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
needs: check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly, 1.40.0]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features
deny-check:
name: cargo-deny check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: EmbarkStudios/cargo-deny-action@v1
+4
View File
@@ -0,0 +1,4 @@
# Patch dependencies to run all tests against versions of the crate in the
# repository.
[patch.crates-io]
tower-web = { path = "tower-web" }