Skip to content

Commit

Permalink
Replace Travis with GitHub Actions (#6)
Browse files Browse the repository at this point in the history
* Update badges
  • Loading branch information
parasyte authored Oct 2, 2022
1 parent e653330 commit 6289730
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 25 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
checks:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- 1.37.0
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy, rustfmt
override: true
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps
- name: Cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --tests -- -D warnings
tests:
name: Test
runs-on: ubuntu-latest
needs: [checks, lints]
strategy:
matrix:
rust:
- stable
- beta
- 1.37.0
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ keywords = ["chain", "error", "iter", "iterator", "sources"]
categories = ["rust-patterns"]
license = "MIT"

# NOTE: This field was first added in Rust 1.56.0
rust-version = "1.37"

[badges]
travis-ci = { repository = "parasyte/error-iter" }
maintenance = { status = "experimental" }

[dev-dependencies]
thiserror = "1.0"
thiserror = "1"
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# `error-iter`

[![Documentation](https://docs.rs/error-iter/badge.svg)](https://docs.rs/error-iter)
[![Build Status](https://travis-ci.org/parasyte/error-iter.svg?branch=master)](https://travis-ci.org/parasyte/error-iter)
[![Crates.io](https://img.shields.io/crates/v/error-iter)](https://crates.io/crates/error-iter "Crates.io version")
[![Documentation](https://img.shields.io/docsrs/error-iter)](https://docs.rs/error-iter "Documentation")
[![GitHub actions](https://img.shields.io/github/workflow/status/parasyte/error-iter/CI)](https://github.com/parasyte/error-iter/actions "CI")
[![GitHub activity](https://img.shields.io/github/last-commit/parasyte/error-iter)](https://github.com/parasyte/error-iter/commits "Commit activity")
[![GitHub Sponsors](https://img.shields.io/github/sponsors/parasyte)](https://github.com/sponsors/parasyte "Sponsors")
[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)

Use [`Error::chain`](https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.chain) on stable Rust.
Expand Down

0 comments on commit 6289730

Please sign in to comment.