Setup GitHub #2

Merged
newsch merged 9 commits from housekeeping into main 2023-06-01 07:25:35 +00:00
3 changed files with 38 additions and 4 deletions

36
.github/workflows/rust-checks.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Rust Checks
on:
pull_request:
paths-ignore:
- .gitignore
- LICENSE
- README.md
jobs:
test:
name: cargo check/clippy/fmt/test
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
# Bump this to manually invalidate the build/dependency cache.
# It is also keyed on the job, rustc version, Cargo.lock, and other
# values explained here: https://github.com/Swatinem/rust-cache#cache-details
prefix-key: "v0-rust"
- name: Check compilation
run: cargo check --verbose --locked
- name: Lint
run: cargo clippy
- name: Test
run: cargo test --verbose --locked
- name: Formatting
run: cargo fmt --verbose --check

View file

@ -1,7 +1,7 @@
[package]
name = "om-wikiparser"
version = "0.0.0"
license = "AGPL-3.0-or-later"
license = "AGPL-3.0-only"
edition = "2021"
repository = "https://github.com/organicmaps/wikiparser/"

View file

@ -2,9 +2,7 @@
// pv ~/Downloads/enwiki-NS0-20230401-ENTERPRISE-HTML.json.tar.gz | tar xzO | cargo run --release > /dev/null
use serde::Deserialize;
use std::{
io::{self, stdin, BufRead, BufReader, Write},
};
use std::io::{self, stdin, BufRead, BufReader, Write};
#[derive(Deserialize)]
struct Page {