Skip to content

Commit 94d8444

Browse files
authored
Replace Travis CI with GitHub CI (#91)
1 parent b6628c6 commit 94d8444

File tree

3 files changed

+102
-36
lines changed

3 files changed

+102
-36
lines changed

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: "-D warnings"
12+
13+
jobs:
14+
15+
test:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
rust:
20+
- stable
21+
- beta
22+
- nightly
23+
- 1.49.0 # MSRV
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions-rs/toolchain@v1
27+
with:
28+
profile: minimal
29+
toolchain: ${{ matrix.rust }}
30+
override: true
31+
- name: Build
32+
run: cargo build --verbose
33+
- name: Run tests
34+
run: cargo test --verbose
35+
36+
cross_test:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
include:
41+
# 64-bit, big-endian
42+
- rust: stable
43+
target: mips64-unknown-linux-gnuabi64
44+
# 32-bit, big-endian
45+
- rust: stable
46+
target: mips-unknown-linux-gnu
47+
# 32-bit, little-endian
48+
- rust: stable
49+
target: i686-unknown-linux-gnu
50+
steps:
51+
- uses: actions/checkout@v2
52+
- uses: actions-rs/toolchain@v1
53+
with:
54+
profile: minimal
55+
toolchain: ${{ matrix.rust }}
56+
target: ${{ matrix.target }}
57+
override: true
58+
- name: Install cross
59+
run: cargo install cross -f
60+
- name: Build
61+
run: cross build --verbose --target=${{ matrix.target }}
62+
- name: Run tests
63+
run: cross test --verbose --target=${{ matrix.target }}
64+
65+
format:
66+
runs-on: ubuntu-latest
67+
strategy:
68+
matrix:
69+
rust:
70+
- stable
71+
steps:
72+
- uses: actions/checkout@v2
73+
- uses: actions-rs/toolchain@v1
74+
with:
75+
profile: minimal
76+
toolchain: ${{ matrix.rust }}
77+
override: true
78+
components: rustfmt
79+
- name: Rustfmt
80+
run: cargo fmt -- --check
81+
82+
coverage:
83+
runs-on: ubuntu-latest
84+
strategy:
85+
matrix:
86+
rust:
87+
- nightly
88+
steps:
89+
- uses: actions/checkout@v2
90+
- uses: actions-rs/toolchain@v1
91+
with:
92+
profile: minimal
93+
toolchain: ${{ matrix.rust }}
94+
override: true
95+
- name: Install tarpaulin
96+
run: cargo install cargo-tarpaulin -f
97+
- name: Generate code coverage
98+
run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
99+
- name: Upload to codecov.io
100+
uses: codecov/codecov-action@v1
101+
with:
102+
fail_ci_if_error: true

.travis.yml

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

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# ndarray-stats
22

3-
[![Build status](https://travis-ci.org/rust-ndarray/ndarray-stats.svg?branch=master)](https://travis-ci.org/rust-ndarray/ndarray-stats)
43
[![Coverage](https://codecov.io/gh/rust-ndarray/ndarray-stats/branch/master/graph/badge.svg)](https://codecov.io/gh/rust-ndarray/ndarray-stats)
54
[![Dependencies status](https://deps.rs/repo/github/rust-ndarray/ndarray-stats/status.svg)](https://deps.rs/repo/github/rust-ndarray/ndarray-stats)
65
[![Crate](https://img.shields.io/crates/v/ndarray-stats.svg)](https://crates.io/crates/ndarray-stats)

0 commit comments

Comments
 (0)