Skip to content

Commit

Permalink
Add bors (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
passcod committed May 30, 2022
1 parent a73d857 commit 08d410e
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 96 deletions.
78 changes: 28 additions & 50 deletions .github/workflows/check.yml
@@ -1,22 +1,17 @@
name: PR feedback
on:
pull_request:
push:
branches:
- main
- try/**

name: Checks & Tests

jobs:
check:
clippy:
strategy:
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,59 +21,42 @@ jobs:
profile: minimal
toolchain: stable
override: true

- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: check
- uses: actions-rs/cargo@v1
with:
command: check
args: --features windows-console
# check to make sure it keeps compiling, but this is unsupported buggy code for now
command: clippy

- uses: actions-rs/cargo@v1
if: matrix.platform != 'windows'
with:
command: test
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --doc
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed terminfo
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed xterm
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed tput
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed windows_cls
# I've absolutely tested the windows_vt things LOCALLY but they DON'T WORK IN CI
# I don't know why and at this point I'm very very tired. If you know, help pls.
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed vt_ris
- if: matrix.platform == 'windows'
shell: powershell
run: cd tests/win10; cargo run
fmt-check:
name: Check formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
command: fmt
args: --check

windows-console:
name: Check windows-console feature compiles
runs-on: windows-latest

msrv:
name: Check on MSRV
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 windows-console
# check to make sure it keeps compiling, but this is unsupported buggy code for now

28 changes: 28 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,28 @@
name: Main branch
on:
push:
branches:
- main

jobs:
check:
strategy:
matrix:
include:
- platform: macos
- platform: ubuntu
- platform: windows

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

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

jobs:
check:
strategy:
matrix:
include:
- platform: macos
toolchain: stable
- platform: macos
toolchain: 1.51.0
- platform: ubuntu
toolchain: stable
- platform: ubuntu
toolchain: 1.51.0
- platform: windows
toolchain: stable
- platform: windows
toolchain: 1.51.0

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

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "${{ matrix.toolchain }}"
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
if: matrix.platform != 'windows'
with:
command: test
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --doc
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed terminfo
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed xterm
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed tput
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed windows_cls
# I've absolutely tested the windows_vt things LOCALLY but they DON'T WORK IN CI
# I don't know why and at this point I'm very very tired. If you know, help pls.
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed vt_ris
- if: matrix.platform == 'windows'
shell: powershell
run: cd tests/win10; cargo run
39 changes: 0 additions & 39 deletions CARETAKERS.md

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
@@ -1,19 +1,17 @@
[![Crate release version](https://flat.badgen.net/crates/v/clearscreen)](https://crates.io/crates/clearscreen)
[![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/clearscreen/actions/workflows/check.yml/badge.svg)](https://github.com/watchexec/clearscreen/actions/workflows/check.yml)
[![Uses Caretaker Maintainership](https://flat.badgen.net/badge/Caretaker/Maintainership%20👥%20/purple)][caretaker]
[![Crate release version](https://badgen.net/crates/v/clearscreen)](https://crates.io/crates/clearscreen)
[![Crate license: Apache 2.0 or MIT](https://badgen.net/badge/license/Apache%202.0%20or%20MIT)][copyright]
![MSRV: 1.51.0 (breaking)](https://badgen.net/badge/MSRV/1.51.0%20%28breaking%29/green)
[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/45671)
[![CI status on main branch](https://github.com/watchexec/clearscreen/actions/workflows/main.yml/badge.svg)](https://github.com/watchexec/clearscreen/actions/workflows/main.yml)

# ClearScreen

_Cross-platform terminal screen clearing library._

- **[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
[copyright]: ./COPYRIGHT
[docs]: https://docs.rs/clearscreen

Expand Down
19 changes: 19 additions & 0 deletions bors.toml
@@ -0,0 +1,19 @@
delete_merged_branches = true
update_base_for_deletes = true
use_squash_merge = true

status = [
"Test on macos with Rust stable",
"Test on ubuntu with Rust stable",
"Test on windows with Rust stable",
"Test on macos with Rust 1.51.0",
"Test on ubuntu with Rust 1.51.0",
"Test on windows with Rust 1.51.0",
]

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

0 comments on commit 08d410e

Please sign in to comment.