Skip to content

Commit

Permalink
Merge pull request #200 from bradfier/use-github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfier committed Apr 16, 2021
2 parents 2ba0c96 + 8c17c30 commit 8ea9d88
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 1 deletion.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,80 @@
on: [push, pull_request]
name: CI
jobs:
clippy_rustfmt:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features

# - name: Format
# uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: -- --check

test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Build (Default Features)
uses: actions-rs/cargo@v1
with:
command: build

- name: Build (All Features)
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features

test_msrv:
name: Test MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install 1.41 toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.41.1
override: true

- name: Build (Default Features)
uses: actions-rs/cargo@v1
with:
command: build

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
2 changes: 1 addition & 1 deletion tests/non-chunked-buffering.rs
Expand Up @@ -45,7 +45,7 @@ fn big_response_reader() -> Reader {
fn identity_served<'a>(r: &'a mut Reader) -> tiny_http::Response<&'a mut Reader> {
let body_len = r.inner.get_ref().len();
tiny_http::Response::empty(200)
.with_chunked_threshold(usize::MAX)
.with_chunked_threshold(std::usize::MAX)
.with_data(r, Some(body_len))
}

Expand Down

0 comments on commit 8ea9d88

Please sign in to comment.