CI: Switch to GitHub Actions

This commit is contained in:
Danilo Bargen 2020-01-22 23:10:30 +01:00
commit 7b3f7a6470
4 changed files with 56 additions and 48 deletions

View file

@ -1,34 +0,0 @@
version: 2
jobs:
build:
docker:
- image: rust:1.36
steps:
- checkout
# Load cargo target from cache if possible.
# Multiple caches are used to increase the chance of a cache hit.
- restore_cache:
keys:
- v2-cargo-cache-{{ arch }}-{{ .Branch }}
- v2-cargo-cache-{{ arch }}
# Show versions
- run: rustc --version && cargo --version
# Build
- run: cargo build
- run: cargo build --features logging
# Run tests
- run: cargo test
- save_cache:
key: v2-cargo-cache-{{ arch }}-{{ .Branch }}
paths:
- target
- /usr/local/cargo
- save_cache:
key: v2-cargo-cache-{{ arch }}
paths:
- target
- /usr/local/cargo

51
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,51 @@
on:
push:
schedule:
- cron: '30 3 * * 2'
name: CI
jobs:
test:
name: run tests
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
rust: [1.36.0, stable]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build with default features
uses: actions-rs/cargo@v1
with:
command: build
- name: Build with all features
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
clippy:
name: run clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.36.0
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

View file

@ -1,7 +0,0 @@
language: rust
os: osx
rust:
- 1.36.0
- stable
cache: cargo
script: cargo test

View file

@ -2,9 +2,9 @@
![teal deer](deer.png)
|Crate|Linux|macOS|Windows|
|:---:|:---:|:---:|:-----:|
|[![Crates.io][crates-io-badge]][crates-io]|[![Circle CI][circle-ci-badge]][circle-ci]|[![Travis CI][travis-ci-badge]][travis-ci]|Should work™|
|Crate|CI (Linux/macOS/Windows)|
|:---:|:---:|
|[![Crates.io][crates-io-badge]][crates-io]|[![GitHub CI][github-actions-badge]][github-actions]|
A very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in
Rust: Simplified, example based and community-driven man pages.
@ -241,9 +241,7 @@ Thanks to @SShrike for coming up with the name "tealdeer"!
[tldr-node-client]: https://github.com/tldr-pages/tldr-node-client
<!-- Badges -->
[circle-ci]: https://circleci.com/gh/dbrgn/tealdeer/tree/master
[circle-ci-badge]: https://circleci.com/gh/dbrgn/tealdeer/tree/master.svg?style=shield
[travis-ci]: https://travis-ci.org/dbrgn/tealdeer
[travis-ci-badge]: https://travis-ci.org/dbrgn/tealdeer.svg?branch=master
[github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amaster
[github-actions-badge]: https://github.com/dbrgn/tealdeer/workflows/CI/badge.svg
[crates-io]: https://crates.io/crates/tealdeer
[crates-io-badge]: https://img.shields.io/crates/v/tealdeer.svg