Skip to content

Commit f4aaa5b

Browse files
committed
Use GitHub Actions for CI
1 parent 8c26745 commit f4aaa5b

File tree

5 files changed

+131
-50
lines changed

5 files changed

+131
-50
lines changed

.github/actions-rs/grcov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignore-not-existing: true
2+
ignore:
3+
- "../*"

.github/workflows/ci.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
2+
3+
name: CI
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
check:
9+
name: Check
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
toolchain: [stable, beta, nightly]
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v2
17+
18+
- name: Install ${{ matrix.toolchain }} toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: ${{ matrix.toolchain }}
23+
override: true
24+
25+
- name: Run cargo check
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: check
29+
args: --all-features --all
30+
31+
test:
32+
name: Test Suite
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
toolchain: [stable, beta, nightly]
37+
steps:
38+
- name: Checkout sources
39+
uses: actions/checkout@v2
40+
41+
- name: Install ${{ matrix.toolchain }} toolchain
42+
uses: actions-rs/toolchain@v1
43+
with:
44+
profile: minimal
45+
toolchain: ${{ matrix.toolchain }}
46+
override: true
47+
48+
- name: Run cargo test
49+
uses: actions-rs/cargo@v1
50+
with:
51+
command: test
52+
args: --all-features --all
53+
54+
lints:
55+
name: Lints
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
toolchain: [stable, beta, nightly]
60+
steps:
61+
- name: Checkout sources
62+
uses: actions/checkout@v2
63+
64+
- name: Install ${{ matrix.toolchain }} toolchain
65+
uses: actions-rs/toolchain@v1
66+
with:
67+
profile: minimal
68+
toolchain: ${{ matrix.toolchain }}
69+
override: true
70+
components: rustfmt, clippy
71+
72+
- name: Run cargo fmt
73+
uses: actions-rs/cargo@v1
74+
with:
75+
command: fmt
76+
args: --all -- --check
77+
78+
- name: Run cargo clippy
79+
uses: actions-rs/cargo@v1
80+
with:
81+
command: clippy
82+
args: --all-features --all -- -D warnings
83+
84+
grcov:
85+
name: Coverage
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v2
89+
90+
- name: Install toolchain
91+
uses: actions-rs/toolchain@v1
92+
with:
93+
toolchain: nightly
94+
override: true
95+
96+
- name: Execute tests
97+
uses: actions-rs/cargo@v1
98+
with:
99+
command: test
100+
args: --all --all-features
101+
env:
102+
CARGO_INCREMENTAL: 0
103+
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
104+
RUSTDOCFLAGS: "-Cpanic=abort"
105+
106+
- name: Gather coverage data
107+
id: coverage
108+
uses: actions-rs/grcov@v0.1
109+
110+
- name: Coveralls upload
111+
uses: coverallsapp/github-action@master
112+
with:
113+
github-token: ${{ secrets.GITHUB_TOKEN }}
114+
parallel: true
115+
path-to-lcov: ${{ steps.coverage.outputs.report }}
116+
117+
grcov_finalize:
118+
runs-on: ubuntu-latest
119+
needs: grcov
120+
steps:
121+
- name: Coveralls finalization
122+
uses: coverallsapp/github-action@master
123+
with:
124+
github-token: ${{ secrets.GITHUB_TOKEN }}
125+
parallel-finished: true

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ license = "MIT"
1111
edition = "2018"
1212

1313
[badges]
14-
travis-ci = {repository = "sile/sloggers"}
15-
codecov = {repository = "sile/sloggers"}
14+
coveralls = {repository = "sile/sloggers"}
1615

1716
[features]
1817
default = ["libflate", "slog-kvfilter"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
[![Crates.io: sloggers](https://img.shields.io/crates/v/sloggers.svg)](https://crates.io/crates/sloggers)
44
[![Documentation](https://docs.rs/sloggers/badge.svg)](https://docs.rs/sloggers)
5-
[![Build Status](https://travis-ci.org/sile/sloggers.svg?branch=master)](https://travis-ci.org/sile/sloggers)
6-
[![Code Coverage](https://codecov.io/gh/sile/sloggers/branch/master/graph/badge.svg)](https://codecov.io/gh/sile/sloggers/branch/master)
5+
[![Actions Status](https://github.com/sile/sloggers/workflows/CI/badge.svg)](https://github.com/sile/sloggers/actions)
6+
[![Coverage Status](https://coveralls.io/repos/github/sile/sloggers/badge.svg?branch=master)](https://coveralls.io/github/sile/sloggers?branch=master)
77
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
88
[![Gitter: slog](https://img.shields.io/gitter/room/slog-rs/slog.svg)](https://gitter.im/slog-rs/slog)
99

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy