diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..d3ab3cb5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: [push, pull_request] + +env: + minrust: 1.41.0 + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + strategy: + matrix: + rust: [stable, beta, nightly] + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true + + - name: cargo test --all + uses: actions-rs/cargo@v1 + with: + command: test + args: --all + - name: cargo test --benches + if: matrix.rust == 'nightly' + uses: actions-rs/cargo@v1 + with: + command: test + args: --benches + + - name: Check minimal versions + if: matrix.rust == 'nightly' + run: | + cargo clean + cargo update -Z minimal-versions + cargo check + + MSRV: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install rust ${{ env.minrust }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.minrust }} + profile: minimal + override: true + + - name: cargo build + uses: actions-rs/cargo@v1 + with: + command: build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 20a84338..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: rust -sudo: false - -cache: cargo - -matrix: - include: - - rust: stable - - rust: beta - - rust: nightly - # minimum rustc version - - rust: 1.41.0 - script: cargo build - -script: - - cargo test --all - - 'if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo test --benches; fi' - -notifications: - email: - on_success: never diff --git a/README.md b/README.md index d68f3df9..a93368fb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # rust http headers -[![Build Status](https://travis-ci.org/hyperium/headers.svg?branch=master)](https://travis-ci.org/hyperium/header) +[![Build Status](https://github.com/hyperium/headers/workflows/CI/badge.svg)](https://github.com/hyperium/headers/actions?query=workflow%3ACI) Typed HTTP headers.