Skip to content

Commit 93c202c

Browse files
committed
switch to GitHub Actions
1 parent 2095185 commit 93c202c

File tree

5 files changed

+93
-32
lines changed

5 files changed

+93
-32
lines changed

.github/workflows/ci-version.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI-version
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
tests:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
toolchain:
19+
- nightly
20+
target:
21+
- x86_64-unknown-linux-gnu
22+
- x86_64-unknown-linux-musl
23+
name: Test ${{ matrix.toolchain }} on ${{ matrix.os }} to ${{ matrix.target }}
24+
runs-on: ${{ matrix.os }}
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions-rs/toolchain@v1
28+
with:
29+
profile: minimal
30+
toolchain: ${{ matrix.toolchain }}
31+
target: ${{ matrix.target }}
32+
override: true
33+
- run: cargo build --release --target ${{ matrix.target }}
34+
- run: cargo test --release --target ${{ matrix.target }}
35+
- run: cargo doc --release --target ${{ matrix.target }}

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on: [ push, pull_request ]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
rustfmt:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
profile: minimal
16+
toolchain: nightly
17+
override: true
18+
components: rustfmt
19+
- run: cargo fmt -- --check
20+
21+
clippy:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions-rs/toolchain@v1
26+
with:
27+
profile: minimal
28+
toolchain: nightly
29+
override: true
30+
components: clippy
31+
- run: cargo clippy -- -D warnings
32+
33+
tests:
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
os:
38+
- ubuntu-latest
39+
toolchain:
40+
- nightly
41+
target:
42+
- x86_64-unknown-linux-gnu
43+
- x86_64-unknown-linux-musl
44+
name: Test ${{ matrix.toolchain }} on ${{ matrix.os }} to ${{ matrix.target }}
45+
runs-on: ${{ matrix.os }}
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions-rs/toolchain@v1
49+
with:
50+
profile: minimal
51+
toolchain: ${{ matrix.toolchain }}
52+
target: ${{ matrix.target }}
53+
override: true
54+
- run: cargo build --target ${{ matrix.target }}
55+
- run: cargo test --target ${{ matrix.target }}
56+
- run: cargo doc --target ${{ matrix.target }}

.travis.yml

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

Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mprober"
3-
version = "0.11.0-beta.7"
3+
version = "0.11.0-beta.8"
44
authors = ["Magic Len <len@magiclen.org>"]
55
edition = "2018"
66
repository = "https://github.com/magiclen/m-prober"
@@ -12,10 +12,6 @@ readme = "README.md"
1212
license = "MIT"
1313
include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE", "front-end/**/*", "views/**/*"]
1414

15-
[badges.travis-ci]
16-
repository = "magiclen/m-prober"
17-
branch = "master"
18-
1915
[profile.release]
2016
lto = true
2117
codegen-units = 1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
M Prober
22
====================
33

4-
[![Build Status](https://travis-ci.org/magiclen/m-prober.svg?branch=master)](https://travis-ci.org/magiclen/m-prober)
4+
[![CI](https://github.com/magiclen/m-prober/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/m-prober/actions/workflows/ci.yml)
55

66
This program aims to collect Linux system information including hostname, kernel version, uptime, RTC time, load average, CPU, memory, network interfaces, block devices and processes. It can be used not only as a normal CLI tool, but also a web application with a front-end webpage and useful HTTP APIs.
77

0 commit comments

Comments
 (0)