Skip to content

Commit

Permalink
Merge pull request #9 from mdsol/feature/update_crates
Browse files Browse the repository at this point in the history
Update crates, switch to GHA
  • Loading branch information
ykitamura-mdsol authored Dec 19, 2023
2 parents 36508ff + e80caf4 commit 787d44a
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 27 deletions.
5 changes: 1 addition & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
default = "artifactory"

[registries.artifactory]
index = "https://mdsol.jfrog.io/artifactory/git/PlatformLibraries-cargo-prod-local.git"

[net]
git-fetch-with-cli = true
index = "sparse+https://mdsol.jfrog.io/artifactory/api/cargo/PlatformLibraries-cargo-prod-local/index/"
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches:
- main
pull_request:

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10

concurrency:
# Cancel intermediate builds
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Run tests
run: |
cargo test --verbose
cargo bench
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to Artifactory

on:
push:
tags:
- "*.*.*"

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Publish to Artifactory
run: |
cargo publish --registry artifactory --allow-dirty --token "Bearer $PLATFORM_LIBRARIES_ARTIFACTORY_TOKEN"
env:
PLATFORM_LIBRARIES_ARTIFACTORY_TOKEN: "${{secrets.PLATFORM_LIBRARIES_ARTIFACTORY_TOKEN}}"
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.4.0
- Update lazy-regex to version 3.

# 0.3.0
- Update RSA to version 0.9.

Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mauth-core"
version = "0.3.0"
version = "0.4.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -9,7 +9,7 @@ edition = "2021"
anyhow = "1"
base64 = "0.21"
hex = "0.4"
lazy-regex = "2"
lazy-regex = "3"
rsa = "0.9.0"
regex = { version = "1", default_features = false, features = ["std"] }
sha2 = { version = "0.10", features = ["oid"] }
Expand All @@ -18,8 +18,8 @@ urlencoding = "2"
[dev-dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
criterion = "0.4"
rstest = "0.15"
criterion = "0.5"
rstest = "0.18"

[[bench]]
name = "benchmark"
Expand Down

0 comments on commit 787d44a

Please sign in to comment.