Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tesaguri committed Jun 19, 2024
1 parent 16c2f3f commit 77cf411
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
- toolchain: stable
features: js
target: wasm32-unknown-unknown
- crate_name: oauth1-request
- toolchain: '1.46.0'
crate_name: oauth1-request-test
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
Expand Down Expand Up @@ -85,29 +88,31 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --tests --manifest-path oauth1-request/Cargo.toml --no-default-features '--features=${{ matrix.features }}'
args: --verbose --tests --manifest-path ${{ matrix.crate_name }}/Cargo.toml --no-default-features '--features=${{ matrix.features }}'
- name: Check docs of `oauth1-request`
if: matrix.features == 'js,derive'
uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --manifest-path oauth1-request/Cargo.toml --no-default-features '--features=${{ matrix.features }}' --no-deps
args: --verbose --manifest-path ${{ matrix.crate_name }}/Cargo.toml --no-default-features '--features=${{ matrix.features }}' --no-deps
- name: Build `oauth1-request`
if: matrix.crate_name != 'oauth1-request-test' || !contains(matrix.features, 'derive')
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --tests --manifest-path oauth1-request/Cargo.toml --no-default-features '--features=${{ matrix.features }}'
args: --verbose --tests --manifest-path ${{ matrix.crate_name }}/Cargo.toml --no-default-features '--features=${{ matrix.features }}'
- name: Build `examples`
if: ${{ matrix.target == '' && matrix.toolchain != '1.46.0' }}
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --manifest-path examples/Cargo.toml
- name: Test `oauth1-request`
if: ${{ matrix.target == '' && matrix.toolchain != '1.46.0' }}
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path oauth1-request/Cargo.toml --no-default-features '--features=${{ matrix.features }}'
args: --manifest-path ${{ matrix.crate_name }}/Cargo.toml --no-default-features '--features=${{ matrix.features }}'
derive-test:
name: Test `oauth1-request-derive`
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"oauth-credentials",
"oauth1-request",
"oauth1-request-derive",
"oauth1-request-test",
]

[patch.crates-io]
Expand Down
21 changes: 21 additions & 0 deletions oauth1-request-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "oauth1-request-test"
version = "0.0.0"
edition = "2018"
authors = ["Daiki Mizukami <tesaguriguma@gmail.com>"]
description = "A hack to make the CI work with older toolchains."
publish = false

[dependencies]
oauth1-request = { path = "../oauth1-request", default-features = false }

[features]
default = ["hmac-sha1", "std"]
alloc = ["oauth1-request/alloc"]
hmac-sha1 = ["oauth1-request/hmac-sha1"]
rsa-sha1-06 = ["oauth1-request/rsa-sha1-06"]
rsa-sha1-09 = ["oauth1-request/rsa-sha1-09"]
js = ["oauth1-request/js"]
serde = ["oauth1-request/serde"]
std = ["oauth1-request/std"]
test = ["oauth1-request/test"]
1 change: 1 addition & 0 deletions oauth1-request-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub use oauth1_request::*;

0 comments on commit 77cf411

Please sign in to comment.