Skip to content

Commit

Permalink
Merge branch 'main' into coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans authored Oct 12, 2024
2 parents f05261b + a217b40 commit fe4bd8e
Show file tree
Hide file tree
Showing 12 changed files with 578 additions and 546 deletions.
74 changes: 10 additions & 64 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,15 @@
name: Check Changelog

on:
pull_request:
workflow_dispatch:

name: CHANGELOG check

types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
jobs:
changelog_check:
runs-on: ubuntu-latest
check-changelog:
name: Check Changelog Action
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Check if changelog was updated
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- 'CHANGELOG.md'
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: github-actions[bot]
body-includes: CHANGELOG
- if: steps.changes.outputs.src == 'false' && steps.fc.outputs.comment-id == ''
name: Create comment
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Please summarize your changes in [CHANGELOG.md](CHANGELOG.md).
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details.
reactions: rocket
edit-mode: replace
- if: steps.changes.outputs.src == 'false' && steps.fc.outputs.comment-id != ''
name: Update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
Please summarize your changes in [CHANGELOG.md](CHANGELOG.md).
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details.
reactions: rocket
edit-mode: replace
- if: steps.changes.outputs.src == 'true' && steps.fc.outputs.comment-id == ''
name: Create comment
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Thank you for updating [CHANGELOG.md](CHANGELOG.md)! Always feel free to edit it.
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details.
reactions: hooray
edit-mode: replace
- if: steps.changes.outputs.src == 'true' && steps.fc.outputs.comment-id != ''
name: Update comment
uses: peter-evans/create-or-update-comment@v2
- uses: tarides/changelog-check-action@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
Thank you for updating [CHANGELOG.md](CHANGELOG.md)! Always feel free to edit it.
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details.
reactions: hooray
edit-mode: replace
- if: steps.changes.outputs.src == 'false'
run: echo "Please summarize your changes in [CHANGELOG.md](CHANGELOG.md)." && exit 1
- if: steps.changes.outputs.src == 'true'
run: exit 0
changelog: CHANGELOG.md
47 changes: 12 additions & 35 deletions .github/workflows/rustbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
- '**.rs'
- .github/workflows/rustbench.yml
- '**/Cargo.toml'
push:
branches: [main]
workflow_dispatch:

name: Benchmark
Expand All @@ -28,42 +30,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Install Critcmp
uses: baptiste0928/cargo-install@v2
- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v0
with:
crate: critcmp
version: latest

- name: Run Benchmarks on changes
run: cargo bench --bench bench_main -- --save-baseline changes

- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
clean: false

- name: Run Benchmarks before changes
run: cargo bench --bench bench_main -- --save-baseline before
channel: stable
cache-target: release
bins: cargo-codspeed

- name: Compare benchmarks
run: |
echo 'results<<EOF' >> $GITHUB_OUTPUT
critcmp before changes >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
id: compare
- name: Build the benchmark target(s)
run: cargo codspeed build

- name: Comment PR with execution number
uses: thollander/actions-comment-pull-request@v2
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
message: |
Benchmark results:
```
${{ steps.compare.outputs.results }}
```
comment_tag: benchmarks
run: cargo codspeed run
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unrealeased](https://github.com/jeertmans/languagetool-rust/compare/v2.1.2...HEAD)
## [Unreleased](https://github.com/jeertmans/languagetool-rust/compare/v2.1.4...HEAD)

### Chore

- Fixed dependency declaration in README.md. [#118](https://github.com/jeertmans/languagetool-rust/pull/118)
- Fixed some types. [#115](https://github.com/jeertmans/languagetool-rust/pull/115)
- Derive `Hash` on requests types. [#114](https://github.com/jeertmans/languagetool-rust/pull/114)
- Use Codspeed and `check-changelog` actions. [#121](https://github.com/jeertmans/languagetool-rust/pull/121)

## [2.1.4](https://github.com/jeertmans/languagetool-rust/compare/v2.1.3...v2.1.4)

### Fixed

- Fixed serializing of `interpretAs` in `data`. [#103](https://github.com/jeertmans/languagetool-rust/pull/103)

## [2.1.3](https://github.com/jeertmans/languagetool-rust/compare/v2.1.2...v2.1.3)

### Chore

Expand Down Expand Up @@ -44,9 +59,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Chore

- Created founding link. [#19](https://github.com/jeertmans/languagetool-rust/pull/19)
- Added two related projets. [#21](https://github.com/jeertmans/languagetool-rust/pull/21)
- Added two related projects. [#21](https://github.com/jeertmans/languagetool-rust/pull/21)
- Added release dates. [#31](https://github.com/jeertmans/languagetool-rust/pull/31)
- Added `#[must_use]` flag to most structures, to please clippy pendantic. [#29](https://github.com/jeertmans/languagetool-rust/pull/29)
- Added `#[must_use]` flag to most structures, to please clippy pedantic. [#29](https://github.com/jeertmans/languagetool-rust/pull/29)
- Changed conditional compilation flags to directly point to dependency, e.g., `"clap"` instead of `"cli"`. [#28](https://github.com/jeertmans/languagetool-rust/pull/28)
- Use `cargo-nextest` instead of `cargo test` for faster CI testing. [#32](https://github.com/jeertmans/languagetool-rust/pull/32)
- Improve CI testing. [#41](https://github.com/jeertmans/languagetool-rust/pull/41)
Expand Down
Loading

0 comments on commit fe4bd8e

Please sign in to comment.