Skip to content

Add a tool to run the tests of dependencies #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
dep-tests = ["run", "--manifest-path", "./dep-tests/Cargo.toml", "--"]
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,48 @@ jobs:
command: fmt
args: --all -- --check

dep-tests:
strategy:
fail-fast: false

name: dep-tests
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v1

- name: rust-toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.38.0-x86_64-unknown-linux-gnu
override: true
profile: default

- name: '`cargo fmt --all --manifest-path ./dep-tests/Cargo.toml -- --check`'
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --manifest-path ./dep-tests/Cargo.toml -- --check

- name: '`cargo clippy --manifest-path ./dep-tests/Cargo.toml -- -D warnings`'
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ./dep-tests/Cargo.toml -- -D warnings

- name: '`cargo test --no-fail-fast --manifest-path ./dep-tests/Cargo.toml`'
uses: actions-rs/cargo@v1
with:
command: test
args: --no-fail-fast --manifest-path ./dep-tests/Cargo.toml

- name: '`cargo dep-tests --all-features -d 1`'
uses: actions-rs/cargo@v1
with:
command: dep-tests
args: --all-features -d 1

build:
strategy:
fail-fast: false
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target/
/dep-tests/Cargo.lock
/dep-tests/target/
**/*.rs.bk
**/*~
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name = "atcoder-rust-base"
version = "0.1.0"
edition = "2018"

[workspace]
exclude = ["./dep-tests"]

[[bin]]
name = "main"
path = "src/main.rs"
Expand Down
2 changes: 2 additions & 0 deletions cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[template]
exclude = [".github", ".cargo", "dep-tests"]
17 changes: 17 additions & 0 deletions dep-tests.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
exclude = [
"c2-chacha:0.2.3", # よくわからない理由でビルドに失敗する
"derive_more:0.99.2", # 必要なファイルがexcludeされている
"jemallocator:0.3.2", # よくわからない理由でビルドに失敗する
"libm:0.1.4", # `#![deny(warnings)]`
"mac:0.1.1", # `#![deny(warnings)]`
"nom:5.0.1", # 必要なファイルがexcludeされている
"num-rational:0.2.2", # よくわからない理由でビルドに失敗する
"petgraph:0.4.13", # よくわからない理由で実行時に失敗する
"primal:0.2.3", # 最終リリース日が古すぎて"normalizing"が行なわれておらず、workspace membersが相対パスのまま
"primal-estimate:0.2.1", # 最終リリース日が古すぎて"normalizing"が行なわれておらず、workspace membersが相対パスのまま
"proc-macro2:1.0.6", # よくわからない理由でビルドに失敗する
"rand_core:0.3.1", # よくわからない理由でビルドに失敗する
# "smallvec:1.0.0", # 成功はするが謎のエラーが表示される
"syn:0.15.44", # よくわからない理由でビルドに失敗する
"syn:1.0.8", # よくわからない理由でビルドに失敗する
]
18 changes: 18 additions & 0 deletions dep-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "dep-tests"
version = "0.0.0"
authors = []
edition = "2018"
description = "Run all of the tests in the dependency graph."
publish = false

[dependencies]
cargo = "0.40.0"
failure = "0.1.6"
fs_extra = "1.1.0"
itertools = "0.8.2"
maplit = "1.0.2"
once_cell = "1.2.0"
serde = { version = "1.0.103", features = ["derive"] }
structopt = "0.3.5"
toml = "0.5.5"
Loading