Skip to content

Commit 523c327

Browse files
authored
Merge pull request #90 from chrissimpkins/ci-test
Add cross-platform GitHub Actions CI test workflows
2 parents 6edd20a + 0760a35 commit 523c327

File tree

5 files changed

+108
-16
lines changed

5 files changed

+108
-16
lines changed

.github/workflows/fmt.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on: [push, pull_request]
2+
3+
name: Rustfmt check
4+
5+
jobs:
6+
fmt:
7+
name: rustfmt
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout source
11+
uses: actions/checkout@v2
12+
- name: Run rustfmt check
13+
run: |
14+
rustup component add rustfmt
15+
cargo fmt --version
16+
cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false)

.github/workflows/linuxci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
on: [push, pull_request]
2+
3+
name: GNU/Linux CI
4+
5+
jobs:
6+
check:
7+
name: GNU/Linux CI
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Cache cargo registry
11+
uses: actions/cache@v1
12+
with:
13+
path: ~/.cargo/registry
14+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
15+
- name: Cache cargo index
16+
uses: actions/cache@v1
17+
with:
18+
path: ~/.cargo/git
19+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
20+
- name: Cache cargo build
21+
uses: actions/cache@v1
22+
with:
23+
path: target
24+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
25+
26+
- uses: actions/checkout@v2
27+
- name: Install latest stable toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
profile: minimal
31+
toolchain: stable
32+
33+
- name: Run cargo test
34+
uses: actions-rs/cargo@v1
35+
with:
36+
command: test

.github/workflows/macosci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
on: [push, pull_request]
2+
3+
name: macOS CI
4+
5+
jobs:
6+
check:
7+
name: macOS CI
8+
runs-on: macos-latest
9+
steps:
10+
- name: Cache cargo registry
11+
uses: actions/cache@v1
12+
with:
13+
path: ~/.cargo/registry
14+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
15+
- name: Cache cargo index
16+
uses: actions/cache@v1
17+
with:
18+
path: ~/.cargo/git
19+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
20+
- name: Cache cargo build
21+
uses: actions/cache@v1
22+
with:
23+
path: target
24+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
25+
26+
- uses: actions/checkout@v2
27+
- name: Install latest stable toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
profile: minimal
31+
toolchain: stable
32+
33+
- name: Run cargo test
34+
uses: actions-rs/cargo@v1
35+
with:
36+
command: test

.github/workflows/windowsci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on: [push, pull_request]
2+
3+
name: Windows CI
4+
5+
jobs:
6+
check:
7+
name: Windows CI
8+
runs-on: windows-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Install latest stable toolchain
12+
uses: actions-rs/toolchain@v1
13+
with:
14+
profile: minimal
15+
toolchain: stable
16+
17+
- name: Run cargo test
18+
uses: actions-rs/cargo@v1
19+
with:
20+
command: test

.travis.yml

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

0 commit comments

Comments
 (0)