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 f31c3b8 commit bb5b30f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
12 changes: 8 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
- toolchain: '1.46.0'
crate_name: oauth1-request-test
- crate_name: oauth1-request
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
Expand Down Expand Up @@ -85,29 +88,30 @@ 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`
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
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 = "oauth-credentials-test"
version = "0.0.0"
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 = ["derive", "hmac-sha1", "std"]
alloc = ["oauth1-request/alloc"]
derive = ["oauth1-request/derive"]
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 oauth_request::*;

0 comments on commit bb5b30f

Please sign in to comment.