diff --git a/.cargo/config.toml b/.cargo/config.toml index 6449621..793aa23 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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/" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..97d3f7b --- /dev/null +++ b/.github/dependabot.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aacb6b3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7200b6e --- /dev/null +++ b/.github/workflows/publish.yml @@ -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}}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 14ca48c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: rust -rust: 1.70 -cache: cargo - -script: - - cargo build --verbose - - cargo test --verbose - - cargo bench - -before_deploy: - - git config --global credential.helper store - - echo "https://$ARTIFACTORY_USER:$ARTIFACTORY_TOKEN@mdsol.jfrog.io" > ~/.git-credentials - -deploy: - edge: true # opt in to dpl v2 - provider: cargo - allow_dirty: true - on: - tags: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 931e06b..b88cf4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.4.0 +- Update lazy-regex to version 3. + # 0.3.0 - Update RSA to version 0.9. diff --git a/Cargo.toml b/Cargo.toml index 965b51a..bf77b62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 @@ -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"] } @@ -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"