-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Kshitij Sharma <kshitij4sharma@gmail.com> Co-authored-by: Kshitij Sharma <s2155899@ed.ac.uk>
- Loading branch information
1 parent
0f1da38
commit 58b6f19
Showing
5 changed files
with
86 additions
and
7 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,24 @@ | ||
# https://doc.rust-lang.org/cargo/guide/continuous-integration.html | ||
|
||
name: Cargo Build & Test | ||
|
||
on: push | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_test: | ||
name: Cargo Build & Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: cargo build --verbose | ||
- run: cargo test --verbose |
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,53 @@ | ||
name: Linter | ||
|
||
on: push | ||
|
||
jobs: | ||
rust-clippy: | ||
name: Run clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
rust-fmt: | ||
name: Run rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run rustfmt | ||
run: cargo fmt --all -- --check | ||
|
||
typos: | ||
name: Spell check with typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run typos | ||
uses: crate-ci/typos@master | ||
|
||
find-todos-fixme: | ||
name: Find todos and fixmes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run todo check | ||
run: | | ||
if grep -riE -n 'TODO|FIXME' * | grep -v -i 'TODOLater'; then | ||
exit 1 | ||
else | ||
echo "All good" | ||
fi | ||
check-no-crlf: | ||
name: Check no crlf line endings | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run check for CRLF line endings | ||
run: | | ||
if git ls-files --eol | grep crlf; then | ||
echo "[ERROR] found CRLF line endings, install dos2unix and run 'find . -type f -exec dos2unix {} \;' to fix" | ||
exit 1 | ||
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,2 @@ | ||
reorder_imports = true | ||
imports_granularity = "Crate" |
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