From ffbbab279151db20391a354a0f443cb9a1f36ff8 Mon Sep 17 00:00:00 2001 From: ysimonson Date: Sun, 13 Aug 2023 10:41:54 -0400 Subject: [PATCH 1/2] Switch to github workflows for CI --- .github/workflows/test.yml | 40 ++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9924129 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +# Largely built from this excellent guide: +# https://shift.click/blog/github-actions-rust/#run-on-pushes-to-main--prs-to-main-or-dev + +name: Test + +env: + RUST_BACKTRACE: 1 + CARGO_INCREMENTAL: 0 + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + name: ${{ matrix.rust }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - { rust: stable, os: ubuntu-latest } + - { rust: nightly, os: ubuntu-latest } + steps: + - uses: actions/checkout@v2 + + - uses: hecrj/setup-rust-action@v1 + with: + rust-version: ${{ matrix.rust }} + components: clippy, rustfmt + + - uses: Swatinem/rust-cache@v1 + + - run: cargo test + - run: cargo clippy + - run: cargo fmt -- --check diff --git a/README.md b/README.md index b03259f..00bd5dc 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,9 @@ [![Docs.rs](https://docs.rs/tcp-channel/badge.svg)](https://docs.rs/tcp-channel) [![Build Status](https://travis-ci.org/4lDO2/tcp-channel.svg?branch=master)](https://travis-ci.org/4lDO2/tcp-channel) +[![crates.io](https://img.shields.io/crates/v/tcp-channel.svg)](https://crates.io/crates/tcp-channel) +[![Released API docs](https://docs.rs/tcp-channel/badge.svg)](https://docs.rs/tcp-channel) +[![Test](https://github.com/4lDO2/tcp-channel/actions/workflows/test.yml/badge.svg)](https://github.com/4lDO2/tcp-channel/actions/workflows/test.yml) + SPSC channels in Rust, transmitted through anything that implements `Read` and `Write`. It uses `bincode` and `serde` for serialization and deserialization. From 4bd6c9feb0450f63a77ef8db4231f1d9c7d6cc24 Mon Sep 17 00:00:00 2001 From: ysimonson Date: Sun, 13 Aug 2023 10:48:03 -0400 Subject: [PATCH 2/2] Remove old badges --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 00bd5dc..c6cd527 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ # tcp-channel -[![Crates.io](http://meritbadge.herokuapp.com/tcp-channel)](https://crates.io/crates/tcp-channel) -[![Docs.rs](https://docs.rs/tcp-channel/badge.svg)](https://docs.rs/tcp-channel) -[![Build Status](https://travis-ci.org/4lDO2/tcp-channel.svg?branch=master)](https://travis-ci.org/4lDO2/tcp-channel) - [![crates.io](https://img.shields.io/crates/v/tcp-channel.svg)](https://crates.io/crates/tcp-channel) [![Released API docs](https://docs.rs/tcp-channel/badge.svg)](https://docs.rs/tcp-channel) [![Test](https://github.com/4lDO2/tcp-channel/actions/workflows/test.yml/badge.svg)](https://github.com/4lDO2/tcp-channel/actions/workflows/test.yml)