Skip to content

Commit

Permalink
Add more CI checks and test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
Niel Drummond committed Apr 9, 2021
1 parent 01bd9da commit 08bcea1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
37 changes: 34 additions & 3 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,36 @@ jobs:
toolchain: stable
override: true

- name: Run cargo check
- name: Run cargo check isahc
uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
args: --features isahc,mercy,squirrel-girl,inertia,starfox --target x86_64-unknown-linux-gnu

- name: Run cargo check reqwest
uses: actions-rs/cargo@v1
with:
command: check
args: --features reqwest,mercy,squirrel-girl,inertia,starfox --target x86_64-unknown-linux-gnu

- name: Run cargo check ureq
uses: actions-rs/cargo@v1
with:
command: check
args: --features ureq,mercy,squirrel-girl,inertia,starfox --target x86_64-unknown-linux-gnu

- name: Install wasm toolchain
uses: actions-rs/toolchain@v1
with:
target: wasm32-unknown-unknown
toolchain: stable
override: true

- name: Run cargo check wasm
uses: actions-rs/cargo@v1
with:
command: check
args: --features mercy,squirrel-girl,inertia,starfox --target wasm32-unknown-unknown

test:
name: Test Suite
Expand Down Expand Up @@ -55,8 +80,14 @@ jobs:
toolchain: stable
override: true

- name: Run cargo test
- name: Run cargo test isahc
uses: actions-rs/cargo@v1
with:
command: test
args: --features isahc,mercy,squirrel-girl,inertia,starfox,mock --target x86_64-unknown-linux-gnu

- name: Run cargo test ureq
uses: actions-rs/cargo@v1
with:
command: test
args: --features ureq,mercy,squirrel-girl,inertia,starfox,mock --target x86_64-unknown-linux-gnu
9 changes: 2 additions & 7 deletions tests/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ async fn get_wasm_fail() {
#[cfg(target_arch = "x86_64")]
#[test]
fn get_sync_fail() {
env_logger::try_init().unwrap();

let auth = Auth::None;

let per_page = api::PerPage::new(1);
Expand All @@ -60,7 +58,8 @@ fn get_sync_fail() {
Err(repos::ReposListCommitsError::Status404(e)) => {
debug!("{}", e.message.as_ref().unwrap());
}
Err(_) => {
Err(x) => {
debug!("{:?}", x);
assert!(false);
}
};
Expand Down Expand Up @@ -113,8 +112,6 @@ async fn get_wasm_ok() {
#[cfg(feature = "isahc")]
#[test]
fn get_async_ok() {
env_logger::try_init();

let req = futures_lite::future::block_on(async {

let auth = Auth::None;
Expand All @@ -139,8 +136,6 @@ fn get_async_ok() {
#[cfg(feature = "reqwest")]
#[tokio::test]
async fn get_async_ok() {
env_logger::try_init().unwrap();

let auth = Auth::None;
let per_page = api::PerPage::new(1);

Expand Down

0 comments on commit 08bcea1

Please sign in to comment.