-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to Github Actions #399
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,27 @@ | ||||||||||||||
on: | ||||||||||||||
pull_request: | ||||||||||||||
paths-ignore: | ||||||||||||||
- "docs/**/*" | ||||||||||||||
- "scripts/**/*" | ||||||||||||||
- "README.md" | ||||||||||||||
|
||||||||||||||
name: Audit Dependencies | ||||||||||||||
|
||||||||||||||
jobs: | ||||||||||||||
audit: | ||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the options here? Is this the platform that we encourage people to use? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not necessarily, but it's what we were building on Circle already. If we want to support others, we can add steps to build it on other platforms too (as a separate PR) |
||||||||||||||
steps: | ||||||||||||||
- name: Checkout sources | ||||||||||||||
uses: actions/checkout@v1 | ||||||||||||||
|
||||||||||||||
- name: Install stable toolchain | ||||||||||||||
uses: actions-rs/toolchain@v1 | ||||||||||||||
with: | ||||||||||||||
toolchain: stable | ||||||||||||||
override: true | ||||||||||||||
|
||||||||||||||
- name: Install cargo-audit | ||||||||||||||
run: cargo install cargo-audit | ||||||||||||||
|
||||||||||||||
- name: Audit dependencies | ||||||||||||||
run: cargo audit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build and Test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a semantic reason why the name is at the top for this one? |
||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "docs/**/*" | ||
- "scripts/**/*" | ||
- "README.md" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build | ||
run: cargo build --all-targets --all-features | ||
- name: Install redis | ||
run: sudo apt install redis-server && redis-server --version | ||
- name: Run tests | ||
run: cargo test --all --all-features | ||
timeout-minutes: 10 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
on: | ||
push: | ||
paths-ignore: | ||
- "docs/**/*" | ||
- "scripts/**/*" | ||
- "README.md" | ||
|
||
name: Check Style | ||
|
||
jobs: | ||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install rustfmt | ||
run: rustup component add rustfmt | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- id: component | ||
uses: actions-rs/components-nightly@v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be using nightly here? Just being conservative in case nightly clippy tells us to do something that works in nightly, but does not work on stable |
||
with: | ||
component: clippy | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ steps.component.outputs.toolchain }} | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-targets --all-features -- -D warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't
cargo audit
be runon: push
, instead ofon: pull_request
?