Skip to content

Commit 05a54f1

Browse files
committed
Fmt, Clippy, CI to match other georust proj
Please rename the primary branch to `main` for consistency. Similar to other georust projects, make CI: * go through additional fmt and clippy validation * run on pull requests, but ignore non-standard branches (it is usually easier to submit PRs from personal forks, but some maintainers may do it from the primary repo) * run fmt and clippy * add `TileJSONBuilder::default()` * ignore intellij files Minor cleanup: * use `.to_string()` everywhere for consistency * use Self when possible Also, get rid of the custom `cargo-all-features` as it is not really needed, so using the KISS principle :)
1 parent 46b1232 commit 05a54f1

File tree

4 files changed

+345
-293
lines changed

4 files changed

+345
-293
lines changed

.github/workflows/rust.yml

+41-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
1-
on: push
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- staging
6+
- trying
7+
- release/**
8+
pull_request:
9+
schedule: [cron: "45 6 * * *"]
10+
11+
env:
12+
RUST_TOOLCHAIN: stable
13+
TOOLCHAIN_PROFILE: default
14+
215
name: Run tests
316
jobs:
4-
build_and_test:
17+
lints:
18+
name: Run cargo fmt and cargo clippy
519
runs-on: ubuntu-latest
620
steps:
7-
- uses: actions/checkout@v2
8-
- run: cargo install cargo-all-features
9-
- run: cargo build-all-features --verbose
10-
- run: cargo test-all-features --verbose
21+
- name: Checkout sources
22+
uses: actions/checkout@v2
23+
- name: Install toolchain
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
profile: ${{ env.TOOLCHAIN_PROFILE }}
27+
toolchain: ${{ env.RUST_TOOLCHAIN }}
28+
override: true
29+
components: rustfmt, clippy
30+
- name: Cache
31+
uses: Swatinem/rust-cache@v1
32+
- name: Run cargo fmt
33+
uses: actions-rs/cargo@v1
34+
with:
35+
command: fmt
36+
args: --all -- --check
37+
- name: Run cargo clippy
38+
uses: actions-rs/cargo@v1
39+
with:
40+
command: clippy
41+
args: -- -D warnings
42+
- name: Run cargo test
43+
uses: actions-rs/cargo@v1
44+
with:
45+
command: test

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/target/
22
**/*.rs.bk
33
Cargo.lock
4+
.idea

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Unreleased
2+
3+
* for consistency, add `TileJSONBuilder::default()` - same as `::new()`
4+
15
<a name="v0.2.4"></a>
26
### v0.2.4 (2021-10-11)
37

0 commit comments

Comments
 (0)