Skip to content

Commit

Permalink
plug it all together; expect a failure
Browse files Browse the repository at this point in the history
  • Loading branch information
yshavit committed Feb 28, 2025
1 parent 0a641c1 commit d860c65
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,20 @@ jobs:
run: |
min_version="$(docker run --rm -t -v "$PWD/":/app/ foresterre/cargo-msrv find --no-log --output-format minimal)"
echo "result=$min_version" >> "$GITHUB_OUTPUT"
- name: echo
run: echo ${{ steps.run-msrv.outputs.result }}
- name: find version mentioned in readme
id: readme-version
run: |
readme_version="$(cat README.md | cargo run -- '# Development | P: "Requires rustc >=" ' | awk '{print $NF}')"
echo "result=$readme_version" >> "$GITHUB_OUTPUT"
- name: compare versions
run: |
if [[ "$MSRV_VERSION" != "$README_VERSION" ]]; then
echo "::error title=msrv-mismatch::cargo-msrv was $MSRV_VERSION but README.md says rustc >= $README_VERSION"
exit 1
fi
env:
MSRV_VERSION: ${{ steps.run-msrv.outputs.result }}
README_VERSION: ${{ steps.readme-version.outputs.result }}

check:
runs-on: ubuntu-latest
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,15 @@ cat oncall.md | mdq ':-: * :-: 2024-01-15'
|:----------:|:-----:|:---:|:---:|----:|
| 2024-01-15 | | | x | |
```
# Development
Requires rustc >= 1.20.0
```bash
cargo build
```
```bash
cargo test
```

0 comments on commit d860c65

Please sign in to comment.