Skip to content

Commit

Permalink
Merge pull request #1 from spire-rs/init
Browse files Browse the repository at this point in the history
feat(all): initial commit
  • Loading branch information
martsokha authored Mar 7, 2024
2 parents b55bc3d + 462c213 commit 0ce9c18
Show file tree
Hide file tree
Showing 51 changed files with 6,283 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:

- package-ecosystem: cargo
directory: /
schedule:
day: monday
interval: weekly
70 changes: 70 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
on:
push:
branches:
- main
pull_request:

name: Build

jobs:
ci:
name: CI
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
toolchain: [ stable ]
runs-on: ${{ matrix.os }}
steps:

- name: Check out
uses: actions/checkout@v3

- name: Set up ${{ matrix.toolchain }} Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

- name: Set up Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-${{ matrix.toolchain }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.toolchain }}-cargo-

- name: Install Tarpaulin
if: matrix.os == 'ubuntu-latest'
continue-on-error: true
run: cargo install cargo-tarpaulin

- name: Install & Run Semver
if: matrix.os == 'ubuntu-latest'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
rust-toolchain: ${{ matrix.toolchain }}
feature-group: all-features
verbose: true

- name: Run Cargo:fmt
run: cargo fmt --all -- --check

- name: Run Cargo:clippy
run: cargo clippy --all-features -- -D warnings

- name: Run Cargo:test
run: cargo test --verbose --all-features

- name: Run Cargo:tarpaulin
if: matrix.os == 'ubuntu-latest'
run: cargo tarpaulin --verbose --all-features --out Xml --output-dir ./coverage

- name: Upload Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
files: ./coverage/cobertura.xml
31 changes: 31 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
push:
branches:
- main
workflow_dispatch:

name: Publish

jobs:
cd:
name: CD
strategy:
fail-fast: false
matrix:
crates: [ countio, robotxt, sitemapo ]
runs-on: ubuntu-latest
steps:

- name: Check out
uses: actions/checkout@v3

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Publish
run: cargo publish --token ${CRATES_TOKEN} -p ${CRATE_NAME}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
CRATE_NAME: ${{ matrix.crates }}
32 changes: 23 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
# Generated by Cargo
# will have compiled files and executables
# OS
Thumbs.db
.DS_Store

# Editors
.vs/
.vscode/
.idea/
.fleet/

# Lang: Rust
debug/
target/
**/*.rs.bk

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# Output
dist/
build/

# These are backup files generated by rustfmt
**/*.rs.bk
# Environment
env/
.env
.env*

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# Logs
logs/
*.log
*.log*
Loading

0 comments on commit 0ce9c18

Please sign in to comment.