Skip to content

Commit

Permalink
Configure CI through GitHub Actions
Browse files Browse the repository at this point in the history
[Closes #10]
  • Loading branch information
iredelmeier committed Dec 2, 2019
1 parent 5d54218 commit f3c3b4c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
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
10 changes: 10 additions & 0 deletions scripts/lint.sh
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
5 changes: 5 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -eu

cargo test --all "$@"

0 comments on commit f3c3b4c

Please sign in to comment.