Skip to content

Commit 83a7c89

Browse files
committed
Port basics of .travis.yml to GitHub Actions
"master doc to gh-pages" has not been ported yet for example, but having the basics work will certainly be better than having nothing.
1 parent 6ff4b54 commit 83a7c89

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build:
15+
name: ${{ matrix.rust }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
rust:
21+
- 1.30.0
22+
- stable
23+
- beta
24+
- nightly
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: ${{ matrix.rust }}
30+
default: true
31+
profile: minimal
32+
- run: rustup component add rustfmt-preview
33+
- name: cargo fmt --all -- --check if stable
34+
run: |
35+
if [ "${{ matrix.rust }}" = "stable" ]; then
36+
cargo fmt --all -- --check
37+
fi
38+
- run: |
39+
cargo build --verbose
40+
- run: |
41+
cargo test --verbose

0 commit comments

Comments
 (0)