-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: enhance release ci * update PR checklist * wip: rewrite e2e in rust * add e2e cargo module * rewrite all e2e tests in rust * remove python tests * clippy & fmt * use cargo tests in ci * use which to get tmux * check len * check all lens * increase time out and parallelism * fix no hscroll typo * better check for print0 * add sleep * fix execute_0 * update release ci * try optimizing tests * better sleep * Revert "better sleep" This reverts commit b966367. * split ci * cleanup * test without anchor * use release-please --------- Co-authored-by: LoricAndre <[email protected]>
- Loading branch information
1 parent
d9419c6
commit 7f0dec4
Showing
21 changed files
with
2,245 additions
and
1,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,29 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
RUST_VERSION: 1.82.0 | ||
BIN_NAME: "sk" | ||
name: release-please | ||
|
||
jobs: | ||
publish-crate: | ||
release_please: | ||
name: release-please | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Install correct toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
override: true | ||
- name: Run cargo check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
- name: Publish to crates.io | ||
run: cargo publish -p skim | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | ||
- uses: googleapis/release-please-action@v4 | ||
with: | ||
release-type: rust | ||
bump-minor-pre-major: true | ||
bump-patch-for-minor-pre-major: true | ||
outputs: | ||
release_created: steps.release.outputs.release_created | ||
tag_name: steps.release.outputs.tag_name | ||
build: | ||
if: ${{ jobs.release_please.outputs.release_created }} | ||
name: Build release binaries | ||
strategy: | ||
matrix: | ||
|
@@ -53,12 +46,24 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Clippy | ||
- name: Build | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: build | ||
target: ${{ matrix.arch }}-${{ matrix.os }}${{ contains(matrix.arch, 'arm') && 'eabi' || '' }} | ||
args: "--release --locked" | ||
- name: Test | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: test | ||
target: ${{ matrix.arch }}-${{ matrix.os }}${{ contains(matrix.arch, 'arm') && 'eabi' || '' }} | ||
args: "-p skim --release --locked" | ||
- name: E2E | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: test | ||
target: ${{ matrix.arch }}-${{ matrix.os }}${{ contains(matrix.arch, 'arm') && 'eabi' || '' }} | ||
args: "-p e2e --release --locked -j8" | ||
- name: Create archive | ||
run: | | ||
tar -C target/*/release/ -czvf "skim-${{ matrix.arch }}-${{ matrix.os }}${{ contains(matrix.arch, 'arm') && 'eabi' || '' }}.tgz" "${{ env.BIN_NAME }}" | ||
|
@@ -70,6 +75,7 @@ jobs: | |
retention-days: 1 | ||
release-files: | ||
runs-on: ubuntu-22.04 | ||
if: ${{ jobs.release_please.outputs.release_created }} | ||
steps: | ||
- name: Checkout Git repo | ||
uses: actions/checkout@v4 | ||
|
@@ -99,41 +105,20 @@ jobs: | |
name: files | ||
path: "artifacts/*.tgz" | ||
retention-days: 1 | ||
release: | ||
release-artifacts: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- build | ||
- release-files | ||
- publish-crate | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout Git repo | ||
uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
pattern: "*" | ||
merge-multiple: true | ||
- name: Update CHANGELOG | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
with: | ||
token: ${{ github.token }} | ||
tag: ${{ github.ref_name }} | ||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
body: ${{ steps.changelog.outputs.changes }} | ||
artifacts: | | ||
artifacts/** | ||
- name: Push updated CHANGELOG | ||
run: | | ||
git config user.email '[email protected]' | ||
git config user.name 'skim release action' | ||
git add CHANGELOG.md | ||
git commit -m 'update CHANGELOG.md after release ${{ github.ref_name }}' | ||
git push origin main | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
pattern: "*" | ||
merge-multiple: true | ||
- name: Upload Release Artifact | ||
if: ${{ jobs.release_please.outputs.release_created }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ steps.release.outputs.tag_name }} ./artifacts/*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[workspace] | ||
members = [ | ||
members = [ "e2e", | ||
"skim", | ||
"xtask" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "e2e" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
rand = "0.8.5" | ||
skim = { path = "../skim" } | ||
tempfile = "3.14.0" | ||
which = "7.0.0" |
Oops, something went wrong.