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

Split CI workflows up for the OS badges #24

Merged
merged 3 commits into from
Jun 24, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on: ["push", "pull_request"]

jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run `cargo fmt`
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run `cargo clippy`
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

38 changes: 2 additions & 36 deletions .github/workflows/ci.yml → .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
name: CI
name: Linux

on: ["push", "pull_request"]

jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run `cargo fmt`
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run `cargo clippy`
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

build-git:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -56,7 +35,7 @@ jobs:
path: git.tar.gz
if-no-files-found: error

test:
run-tests:
runs-on: ubuntu-latest
needs: build-git
strategy:
Expand All @@ -78,16 +57,3 @@ jobs:
- name: Run Rust tests
run: PATH_TO_GIT="$PWD"/git cargo test

test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Run Rust tests
run: |
$env:PATH_TO_GIT='C:\Program Files\Git\cmd\git.exe'
cargo test
21 changes: 21 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: macOS
waych marked this conversation as resolved.
Show resolved Hide resolved

on:
schedule:
# Run Mondays and Thursdays at 6:40AM UTC.
- cron: '40 6 * * 1,4'

jobs:
run-tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Run tests
run: |
export PATH_TO_GIT=$(which git)
cargo test
18 changes: 18 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Windows

on: ["push", "pull_request"]

jobs:
run-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Run tests
run: |
$env:PATH_TO_GIT='C:\Program Files\Git\cmd\git.exe'
cargo test
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Branchless workflow for Git

[![CI](https://github.com/arxanas/git-branchless/workflows/CI/badge.svg)](https://github.com/arxanas/git-branchless/actions?query=workflow%3ACI+branch%3Amaster)
[![Linux](https://github.com/arxanas/git-branchless/actions/workflows/linux.yml/badge.svg)](https://github.com/arxanas/git-branchless/actions/workflows/linux.yml)
[![Windows](https://github.com/arxanas/git-branchless/actions/workflows/windows.yml/badge.svg)](https://github.com/arxanas/git-branchless/actions/worksflows/windows.yml)
[![macOS](https://github.com/arxanas/git-branchless/actions/workflows/macos.yml/badge.svg)](https://github.com/arxanas/git-branchless/actions/workflows/macos.yml)
[![crates.io](http://meritbadge.herokuapp.com/git-branchless)](https://crates.io/crates/git-branchless)

`git-branchless` is a suite of tools to help you **visualize**, **navigate**, **manipulate**, and **repair** your commit history. It's based off of the branchless Mercurial workflows at large companies such as Google and Facebook.
Expand Down