Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bors #6

Merged
merged 1 commit into from May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 16 additions & 36 deletions .github/workflows/check.yml
@@ -1,23 +1,17 @@
name: PR feedback
on:
pull_request:
push:
branches:
- main
- try/**

name: Checks & Tests

jobs:
check:
clippy:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu
- windows
- macos
include:
- platform: macos
- platform: ubuntu
- platform: windows

name: Test on ${{ matrix.platform }}
name: "Clippy on ${{ matrix.platform }}"
runs-on: "${{ matrix.platform }}-latest"

steps:
Expand All @@ -26,40 +20,26 @@ jobs:
with:
profile: minimal
toolchain: stable
override: true
default: true

- run: rustup component add clippy
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --features with-tokio
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --features with-tokio
- name: Clippy
uses: actions-rs/cargo@v1
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --features with-tokio
- name: Release test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --features with-tokio

msrv:
name: Check on MSRV
fmt-check:
name: Check formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --features with-tokio
command: fmt
args: --check
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,38 @@
name: Main branch
on:
push:
branches:
- main

jobs:
check:
strategy:
matrix:
include:
- platform: macos
features: default
- platform: macos
features: with-tokio
- platform: ubuntu
features: default
- platform: ubuntu
features: with-tokio
- platform: windows
features: default
- platform: windows
features: with-tokio

name: "Check on ${{ matrix.platform }} (feat: ${{ matrix.features }})"
runs-on: "${{ matrix.platform }}-latest"

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --features ${{ matrix.features }}
64 changes: 64 additions & 0 deletions .github/workflows/merge.yml
@@ -0,0 +1,64 @@
name: Merge (with Bors)
on:
push:
branches:
- staging
- trying

jobs:
check:
strategy:
matrix:
include:
- platform: macos
toolchain: stable
features: default
- platform: macos
toolchain: 1.51.0
features: default
- platform: macos
toolchain: stable
features: with-tokio
- platform: macos
toolchain: 1.51.0
features: with-tokio
- platform: ubuntu
toolchain: stable
features: default
- platform: ubuntu
toolchain: 1.51.0
features: default
- platform: ubuntu
toolchain: stable
features: with-tokio
- platform: ubuntu
toolchain: 1.51.0
features: with-tokio
- platform: windows
toolchain: stable
features: default
- platform: windows
toolchain: 1.51.0
features: default
- platform: windows
toolchain: stable
features: with-tokio
- platform: windows
toolchain: 1.51.0
features: with-tokio

name: "Test on ${{ matrix.platform }} with Rust ${{ matrix.toolchain }} (feat: ${{ matrix.features }})"
runs-on: "${{ matrix.platform }}-latest"

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "${{ matrix.toolchain }}"
default: true

- uses: actions-rs/cargo@v1
with:
command: test
args: --features ${{ matrix.features }}
39 changes: 0 additions & 39 deletions CARETAKERS.md

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,8 @@

## Next (YYYY-MM-DD)

- Add BORS.

## v1.0.8 (2021-10-16)

- Bugfix: compiling would fail when Tokio was missing the `io-util` feature (not `io-std`).
Expand Down
5 changes: 2 additions & 3 deletions README.md
@@ -1,16 +1,15 @@
[![Crate release version](https://flat.badgen.net/crates/v/command-group)](https://crates.io/crates/command-group)
[![Crate license: Apache 2.0 or MIT](https://flat.badgen.net/badge/license/Apache%202.0%20or%20MIT)][copyright]
![MSRV: 1.51.0 (breaking)](https://flat.badgen.net/badge/MSRV/1.51.0%20%28breaking%29/green)
[![CI status](https://github.com/watchexec/command-group/actions/workflows/check.yml/badge.svg)](https://github.com/watchexec/command-group/actions/workflows/check.yml)
[![Uses Caretaker Maintainership](https://flat.badgen.net/badge/Caretaker/Maintainership%20👥%20/purple)][caretaker]
[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/45673)
[![CI status on main branch](https://github.com/watchexec/command-group/actions/workflows/main.yml/badge.svg)](https://github.com/watchexec/command-group/actions/workflows/main.yml)

# Command Group

_Extension to [`Command`](https://doc.rust-lang.org/std/process/struct.Command.html) to spawn in a process group._

- **[API documentation][docs]**.
- [Dual-licensed][copyright] with Apache 2.0 and MIT.
- Uses [Caretaker Maintainership][caretaker].
- Minimum Supported Rust Version: 1.51.0.

[caretaker]: ./CARETAKERS.md
Expand Down
9 changes: 7 additions & 2 deletions bin/version
Expand Up @@ -39,6 +39,7 @@ fi

date=$(date +%Y-%m-%d)
echo "Next version to be $newver ($date), creating..."
git switch -C release

sed -E -i "s/^## Next.*$/## Next (YYYY-MM-DD)\n\n## v$newver ($date)/1" CHANGELOG.md
sed -E -i "s/^command-group = \"$extver\"/command-group = \"$newver\"/1" README.md
Expand All @@ -52,5 +53,9 @@ cargo check
git commit -am "$newver"
git tag -sam "$newver" "v$newver"

echo "Pushing to upstream"
git push --follow-tags $upstream $mainbranch
echo "Pushing to upstream, make a PR for Bors then release with GH"
git push -u $upstream release

echo "Deleting local release branch"
git switch main
git branch -D release
29 changes: 29 additions & 0 deletions bors.toml
@@ -0,0 +1,29 @@
delete_merged_branches = true
update_base_for_deletes = true

status = [
"Test on macos with Rust stable (feat: default)",
"Test on ubuntu with Rust stable (feat: default)",
"Test on windows with Rust stable (feat: default)",
"Test on macos with Rust 1.51.0 (feat: default)",
"Test on ubuntu with Rust 1.51.0 (feat: default)",
"Test on windows with Rust 1.51.0 (feat: default)",

"Test on macos with Rust stable (feat: with-tokio)",
"Test on ubuntu with Rust stable (feat: with-tokio)",
"Test on windows with Rust stable (feat: with-tokio)",
"Test on macos with Rust 1.51.0 (feat: with-tokio)",
"Test on ubuntu with Rust 1.51.0 (feat: with-tokio)",
"Test on windows with Rust 1.51.0 (feat: with-tokio)",
]

# Disabled until https://github.com/bors-ng/bors-ng/issues/1434 is fixed
#pr_status = [
# "Clippy on macos (feat: default)",
# "Clippy on ubuntu (feat: default)",
# "Clippy on windows (feat: default)",
#
# "Clippy on macos (feat: with-tokio)",
# "Clippy on ubuntu (feat: with-tokio)",
# "Clippy on windows (feat: with-tokio)",
#]