Skip to content

Commit 2066a99

Browse files
committed
Add a tool to run the tests of dependencies
1 parent f129c57 commit 2066a99

File tree

8 files changed

+423
-0
lines changed

8 files changed

+423
-0
lines changed

.cargo/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
dep-tests = ["run", "--manifest-path", "./dep-tests/Cargo.toml", "--"]

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,48 @@ jobs:
3737
command: fmt
3838
args: --all -- --check
3939

40+
dep-tests:
41+
strategy:
42+
fail-fast: false
43+
44+
name: dep-tests
45+
runs-on: ubuntu-18.04
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v1
50+
51+
- name: rust-toolchain
52+
uses: actions-rs/toolchain@v1
53+
with:
54+
toolchain: 1.38.0-x86_64-unknown-linux-gnu
55+
override: true
56+
profile: default
57+
58+
- name: '`cargo fmt --all --manifest-path ./dep-tests/Cargo.toml -- --check`'
59+
uses: actions-rs/cargo@v1
60+
with:
61+
command: fmt
62+
args: --all --manifest-path ./dep-tests/Cargo.toml -- --check
63+
64+
- name: '`cargo clippy --manifest-path ./dep-tests/Cargo.toml -- -D warnings`'
65+
uses: actions-rs/cargo@v1
66+
with:
67+
command: clippy
68+
args: --manifest-path ./dep-tests/Cargo.toml -- -D warnings
69+
70+
- name: '`cargo test --no-fail-fast --manifest-path ./dep-tests/Cargo.toml`'
71+
uses: actions-rs/cargo@v1
72+
with:
73+
command: test
74+
args: --no-fail-fast --manifest-path ./dep-tests/Cargo.toml
75+
76+
- name: '`cargo dep-tests --all-features -d 1`'
77+
uses: actions-rs/cargo@v1
78+
with:
79+
command: dep-tests
80+
args: --all-features -d 1
81+
4082
build:
4183
strategy:
4284
fail-fast: false

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/target/
2+
/dep-tests/Cargo.lock
3+
/dep-tests/target/
24
**/*.rs.bk
35
**/*~

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name = "atcoder-rust-base"
55
version = "0.1.0"
66
edition = "2018"
77

8+
[workspace]
9+
exclude = ["./dep-tests"]
10+
811
[[bin]]
912
name = "main"
1013
path = "src/main.rs"

cargo-generate.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[template]
2+
exclude = [".github", ".cargo", "dep-tests"]

dep-tests.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
exclude = [
2+
"c2-chacha:0.2.3", # よくわからない理由でビルドに失敗する
3+
"derive_more:0.99.2", # 必要なファイルがexcludeされている
4+
"jemallocator:0.3.2", # よくわからない理由でビルドに失敗する
5+
"libm:0.1.4", # `#![deny(warnings)]`
6+
"mac:0.1.1", # `#![deny(warnings)]`
7+
"nom:5.0.1", # 必要なファイルがexcludeされている
8+
"num-rational:0.2.2", # よくわからない理由でビルドに失敗する
9+
"petgraph:0.4.13", # よくわからない理由で実行時に失敗する
10+
"primal:0.2.3", # 最終リリース日が古すぎて"normalizing"が行なわれておらず、workspace membersが相対パスのまま
11+
"primal-estimate:0.2.1", # 最終リリース日が古すぎて"normalizing"が行なわれておらず、workspace membersが相対パスのまま
12+
"proc-macro2:1.0.6", # よくわからない理由でビルドに失敗する
13+
"rand_core:0.3.1", # よくわからない理由でビルドに失敗する
14+
# "smallvec:1.0.0", # 成功はするが謎のエラーが表示される
15+
"syn:0.15.44", # よくわからない理由でビルドに失敗する
16+
"syn:1.0.8", # よくわからない理由でビルドに失敗する
17+
]

dep-tests/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "dep-tests"
3+
version = "0.0.0"
4+
authors = []
5+
edition = "2018"
6+
description = "Run all of the tests in the dependency graph."
7+
publish = false
8+
9+
[dependencies]
10+
cargo = "0.40.0"
11+
failure = "0.1.6"
12+
fs_extra = "1.1.0"
13+
itertools = "0.8.2"
14+
maplit = "1.0.2"
15+
once_cell = "1.2.0"
16+
serde = { version = "1.0.103", features = ["derive"] }
17+
structopt = "0.3.5"
18+
toml = "0.5.5"

0 commit comments

Comments
 (0)