Skip to content
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

Fmt, Clippy, CI to match other georust proj #9

Merged
merged 1 commit into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 41 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
on: push
on:
push:
branches:
- main
- staging
- trying
- release/**
pull_request:
schedule: [cron: "45 6 * * *"]

env:
RUST_TOOLCHAIN: stable
TOOLCHAIN_PROFILE: default

name: Run tests
jobs:
build_and_test:
lints:
name: Run cargo fmt and cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo install cargo-all-features
- run: cargo build-all-features --verbose
- run: cargo test-all-features --verbose
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt, clippy
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target/
**/*.rs.bk
Cargo.lock
.idea
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Unreleased

* for consistency, add `TileJSONBuilder::default()` - same as `::new()`
* Migrate to Rust 2021 edition
* Remove `serde_json` dependency

<a name="v0.2.4"></a>
### v0.2.4 (2021-10-11)

Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tilejson"
version = "0.2.5-alpha.0"
description = "Library for serializing the TileJSON file format"
authors = ["Stepan Kuzmin <to.stepan.kuzmin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/tilejson"
homepage = "https://github.com/georust/tilejson"
Expand All @@ -13,4 +13,6 @@ keywords = ["mapbox", "tilejson", "serde"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }

[dev-dependencies]
serde_json = "1.0"
Loading