Skip to content

Commit 2df8d8a

Browse files
author
Ed Page
committed
chore: Pass along improvements
1 parent 6e785de commit 2df8d8a

File tree

6 files changed

+181
-38
lines changed

6 files changed

+181
-38
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ categories = ["development-tools::testing"]
1212
keywords = ["filesystem", "test", "assert", "fixture"]
1313
edition = "2018"
1414

15+
[badges]
16+
azure-devops = { project = "assert-rs", pipeline = "assert_fs" }
17+
codecov = { repository = "assert-rs/assert_fs" }
18+
maintenance = { status = "passively-maintained" }
19+
1520
[dependencies]
1621
tempfile = "3.0"
1722
globwalk = "0.8"

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111
- Setting up files for your tests to consume
1212
- Asserting on files produced by your tests
1313

14-
## Install
15-
16-
Add to your `Cargo.toml`:
17-
18-
```toml
19-
[dependencies]
20-
assert_fs = "1.0.0"
21-
```
22-
2314
## Example
2415

2516
Here is a trivial example:

azure-pipelines.yml

Lines changed: 168 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,178 @@
1+
trigger:
2+
branches:
3+
include: ['master']
4+
tags:
5+
include: ['v*']
6+
pr:
7+
branches:
8+
include:
9+
- master
10+
paths:
11+
exclude:
12+
- "*.md"
13+
- "docs/*"
14+
- "LICENSE-*"
115
schedules:
216
- cron: "6 6 6 * *"
317
displayName: Monthly Build
418
branches:
519
include:
620
- master
21+
variables:
22+
minrust: 1.44.0
23+
codecov_token: $(CODECOV_TOKEN_SECRET)
24+
windows_vm: vs2017-win2016
25+
mac_vm: macos-10.14
26+
linux_vm: ubuntu-16.04
727

8-
jobs:
9-
- template: default.yml@templates
10-
parameters:
11-
minrust: 1.34.0
12-
codecov_token: $(CODECOV_TOKEN_SECRET)
13-
- job: "Committed"
14-
displayName: Lint History
15-
pool:
16-
vmImage: 'ubuntu-16.04'
17-
steps:
18-
- checkout: self
19-
- template: v1/azdo-step.yml@gh-install
20-
parameters:
21-
git: crate-ci/committed
22-
target: 'x86_64-unknown-linux-gnu'
23-
to: $(Build.StagingDirectory)/tools
24-
- script: |
25-
echo "This project uses Conventional style, see https://www.conventionalcommits.org"
26-
$(Build.StagingDirectory)/tools/committed HEAD~..HEAD^2 --no-merge-commit -vv
27-
displayName: Committed
28-
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
28+
stages:
29+
- stage: check
30+
displayName: Compilation Check
31+
jobs:
32+
- job: cargo_check
33+
displayName: cargo check
34+
pool:
35+
vmImage: ${{ variables.linux_vm }}
36+
steps:
37+
- template: install-rust.yml@templates
38+
parameters:
39+
rust: stable
40+
- script: cargo check --workspace --all-targets
41+
displayName: Default features
42+
- script: cargo check --workspace --all-targets --no-default-features
43+
displayName: No-default features
44+
- script: cargo check --workspace --all-targets --all-features
45+
displayName: All features
46+
- stage: test
47+
displayName: Test
48+
jobs:
49+
- job: test
50+
displayName: Test
51+
strategy:
52+
matrix:
53+
windows:
54+
imageName: ${{ variables.windows_vm }}
55+
target: 'x86_64-pc-windows-msvc'
56+
channel: stable
57+
mac:
58+
imageName: ${{ variables.mac_vm }}
59+
target: 'x86_64-apple-darwin'
60+
channel: stable
61+
linux:
62+
imageName: ${{ variables.linux_vm }}
63+
target: 'x86_64-unknown-linux-gnu'
64+
channel: stable
65+
# Check for upcoming platform-specific compiler breakages
66+
windows_beta:
67+
imageName: ${{ variables.windows_vm }}
68+
target: 'x86_64-pc-windows-msvc'
69+
channel: beta
70+
mac_beta:
71+
imageName: ${{ variables.mac_vm }}
72+
target: 'x86_64-apple-darwin'
73+
channel: beta
74+
linux_beta:
75+
imageName: ${{ variables.linux_vm }}
76+
target: 'x86_64-unknown-linux-gnu'
77+
channel: beta
78+
# Check for compiler breakages
79+
linux_nightly:
80+
imageName: ${{ variables.linux_vm }}
81+
target: 'x86_64-unknown-linux-gnu'
82+
channel: nightly
83+
continueOnError: $[ne(variables.rust, 'stable')]
84+
pool:
85+
vmImage: $(imageName)
86+
steps:
87+
- template: install-rust.yml@templates
88+
parameters:
89+
rust: $(channel)
90+
targets: ["$(TARGET)"]
91+
- script: cargo test --target $(TARGET) --workspace
92+
displayName: cargo test
93+
- script: cargo doc --target $(TARGET) --workspace --no-deps
94+
displayName: cargo doc
95+
- job: msrv
96+
displayName: "${{ format('Minimum supported Rust version: {0}', variables.minrust) }}"
97+
dependsOn: []
98+
pool:
99+
vmImage: ${{ variables.linux_vm }}
100+
steps:
101+
- template: install-rust.yml@templates
102+
parameters:
103+
rust: ${{ variables.minrust }}
104+
- script: cargo check --all --bins --examples --tests
105+
displayName: cargo check
106+
- stage: style
107+
displayName: Style checks
108+
dependsOn: []
109+
jobs:
110+
- job: "Committed"
111+
displayName: Linting commit history
112+
pool:
113+
vmImage: ${{ variables.linux_vm }}
114+
steps:
115+
- checkout: self
116+
- template: v1/azdo-step.yml@gh-install
117+
parameters:
118+
git: crate-ci/committed
119+
target: 'x86_64-unknown-linux-gnu'
120+
to: $(Build.StagingDirectory)/tools
121+
- script: |
122+
echo "Linting commits:"
123+
git log --graph --oneline HEAD~..HEAD^2
124+
echo "Against 'committed.toml':"
125+
$(Build.StagingDirectory)/tools/committed --dump-config -
126+
echo ""
127+
echo "If this fails, don't sweat it. We're trying to encourage clear communication and not hinder contributions."
128+
echo "If it is a reasonable issue and you lack time or feel uncomfortable fixing it yourself,"
129+
echo "let us know and we can mentor or fix it."
130+
$(Build.StagingDirectory)/tools/committed HEAD~..HEAD^2 --no-merge-commit -vv
131+
displayName: Lint commit history
132+
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
133+
- job: style
134+
displayName: Style checking
135+
pool:
136+
vmImage: ${{ variables.linux_vm }}
137+
steps:
138+
- template: install-rust.yml@templates
139+
parameters:
140+
rust: stable
141+
components:
142+
- rustfmt
143+
- script: cargo fmt --all -- --check
144+
displayName: rustfmt
145+
- job: lint
146+
displayName: Linting
147+
strategy:
148+
matrix:
149+
current:
150+
channel: ${{ variables.minrust }}
151+
next:
152+
channel: stable
153+
continueOnError: $[eq(variables.channel, 'stable')]
154+
pool:
155+
vmImage: ${{ variables.linux_vm }}
156+
steps:
157+
- template: install-rust.yml@templates
158+
parameters:
159+
rust: $(channel)
160+
components:
161+
- clippy
162+
- script: cargo check --workspace --all-targets --all-features
163+
displayName: Warnings
164+
env:
165+
RUSTFLAGS: "-D warnings"
166+
- script: cargo clippy --workspace --all-features --all-targets -- -D warnings
167+
displayName: clippy
168+
- ${{ if ne('', variables.codecov_token) }}:
169+
- stage: coverage
170+
displayName: Code coverage
171+
dependsOn: test
172+
jobs:
173+
- template: coverage.yml@templates
174+
parameters:
175+
token: ${{ variables.codecov_token }}
29176

30177
resources:
31178
repositories:

committed.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
style="Conventional"
1+
style="conventional"
2+
ignore_author_re="dependabot"
3+
merge_commit = false

release.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ no-dev-version = true
33
tag-message = "{{tag_name}}"
44
tag-name = "{{prefix}}v{{version}}"
55
pre-release-replacements = [
6-
{file="README.md", search="assert_fs = .*", replace="assert_fs = \"{{version}}\""},
7-
{file="src/lib.rs", search="assert_fs = .*", replace="assert_fs = \"{{version}}\""},
6+
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
7+
{file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
8+
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
9+
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
10+
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/assert-rs/predicates-rs/compare/{{tag_name}}...HEAD", exactly=1},
811
]

src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
//! - Setting up files for your tests to consume
55
//! - Asserting on files produced by your tests
66
//!
7-
//! ```toml
8-
//! [dependencies]
9-
//! assert_fs = "1.0.0"
10-
//! ```
11-
//!
127
//! ## Overview
138
//!
149
//! Setting up a fixture

0 commit comments

Comments
 (0)