-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add support GitHub Actions #166
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1a77998
replace unwrap_or with unwrap_or_else for reduce extra allocations
Mephistophiles 76588a1
replace into_iter with iter on slice
Mephistophiles 51671a1
remove unused passing mutable reference
Mephistophiles e574ab0
replace from_iter with collect
Mephistophiles 5c2bf98
reduce indentation: collapse if block
Mephistophiles eebade7
replace if with match block
Mephistophiles ea6dd85
inline literals in format strings
Mephistophiles 12b3c00
add github actions for lint input commits
Mephistophiles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,78 @@ | ||
name: Rust | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CI: 1 | ||
|
||
jobs: | ||
cargo-audit: | ||
name: Audit Rust vulnerabilities | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: rust-audit-check | ||
uses: actions-rs/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
cargo-test: | ||
name: Cargo Test | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: archlinux:base-devel | ||
|
||
steps: | ||
- name: Install Packages | ||
run: pacman -Syu rust clang gcc --noconfirm --needed | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Compile | ||
run: cargo test --no-run --locked | ||
|
||
- name: Test | ||
run: cargo test | ||
|
||
cargo-fmt: | ||
name: Code Format | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: archlinux:base-devel | ||
|
||
steps: | ||
- name: Install Packages | ||
run: pacman -Syu rust clang gcc --noconfirm --needed | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check format | ||
run: cargo fmt --all -- --check | ||
|
||
cargo-clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: archlinux:base-devel | ||
|
||
steps: | ||
- name: Install Packages | ||
run: pacman -Syu rust clang gcc --noconfirm --needed | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
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
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
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
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
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Also why is the secret key needed for this?
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.
It's only needed for forked repos. I will remove it before change to "Ready for Review" state.