Skip to content

Commit

Permalink
chore: improve PR ci (#617)
Browse files Browse the repository at this point in the history
* Bump unicode-width from 0.1.14 to 0.2.0 (#616)

Bumps [unicode-width](https://github.com/unicode-rs/unicode-width) from 0.1.14 to 0.2.0.
- [Commits](unicode-rs/unicode-width@v0.1.14...v0.2.0)

---
updated-dependencies:
- dependency-name: unicode-width
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump nix from 0.25.1 to 0.29.0 (#614)

Bumps [nix](https://github.com/nix-rust/nix) from 0.25.1 to 0.29.0.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](nix-rust/nix@v0.25.1...v0.29.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump env_logger from 0.9.3 to 0.11.5 (#615)

Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.3 to 0.11.5.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.9.3...v0.11.5)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: LoricAndre <[email protected]>

* chore: improve PR ci

* disable cache on fmt job

* add title check

* clean

* Create pr.yml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: LoricAndre <[email protected]>
  • Loading branch information
3 people committed Nov 26, 2024
1 parent 24ccef1 commit e649d08
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: chore(deps)
prefix-development: chore(dev-deps)
35 changes: 35 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"LABEL": {
"name": "invalid-title",
"color": "B60205"
},
"CHECKS": {
"prefixes": [
"feat: ",
"feature: ",
"fix: ",
"bugfix: ",
"perf: ",
"refactor: ",
"test: ",
"tests: ",
"build: ",
"ci: ",
"doc: ",
"docs: ",
"style: ",
"chore: ",
"other: "
],
"regexp": "^\\w+(\\([a-z_-]+\\))?: ",
"regexpFlags": "",
"ignoreLabels": [
"skip-title-check"
]
},
"MESSAGES": {
"success": "PR title is valid",
"failure": "PR title is invalid",
"notice": ""
}
}
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Checklist

_check the box if it is not applicable to your changes_
- [ ] The title of my PR follows the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) convention
- [ ] I have updated the README with the necessary documentation
- [ ] I have added unit tests
- [ ] I have added [end-to-end tests](test/test_skim.py)
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "PR validation"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
- master

jobs:
test:
name: test
e2e:
runs-on: ${{matrix.os}}
strategy:
matrix:
Expand Down Expand Up @@ -54,18 +53,17 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release
- name: Run Tests
run: tmux new-session -d && python3 test/test_skim.py --verbose
env:
LC_ALL: en_US.UTF-8
TERM: xterm-256color
- name: Cache
uses: Swatinem/rust-cache@v1

clippy:
name: clippy
runs-on: ${{matrix.os}}
strategy:
matrix:
Expand Down Expand Up @@ -111,13 +109,12 @@ jobs:
target: ${{ matrix.target }}
override: true
components: clippy
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy
- name: Cache
uses: Swatinem/rust-cache@v1

rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down

0 comments on commit e649d08

Please sign in to comment.