-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure CI through GitHub Actions (#19)
[Closes #10]
- Loading branch information
1 parent
6f39315
commit b793cc5
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- rust:latest | ||
- rustlang/rust:nightly | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ matrix.image }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Test | ||
run: ./scripts/test.sh | ||
lint: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- rust:latest | ||
- rustlang/rust:nightly | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ matrix.image }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Lint | ||
run: ./scripts/lint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
if rustup component add clippy; then | ||
cargo clippy --all-targets --all -- \ | ||
`# Exit with a nonzero code if there are clippy warnings` \ | ||
-Dwarnings \ | ||
"$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
cargo test --all "$@" |