summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Gerace <nickagerace@gmail.com>2022-03-11 23:53:29 -0700
committerNick Gerace <nickagerace@gmail.com>2022-03-12 00:08:02 -0700
commit158dff93eeaa49989ac5050ff415f9d8bb9a9181 (patch)
treef3a1232a158ed262fd46b18bb3cc56a2e14fa3ee
parent4225fddf81425659444d4f91a6f60852c397df63 (diff)
downloadgfold-158dff93eeaa49989ac5050ff415f9d8bb9a9181.zip
Split nightly and stable lints and tests
- Split nightly fmt and stable clippy/test into two jobs - Add bors badge - Declare status names explicitly - Comment out non-deterministic tests for CI - Merge "ubuntu-latest" building into the test job Signed-off-by: Nick Gerace <nickagerace@gmail.com>
-rw-r--r--.github/workflows/ci.yml28
-rw-r--r--Cargo.lock8
-rw-r--r--README.md1
-rw-r--r--bors.toml7
-rw-r--r--src/main.rs36
5 files changed, 51 insertions, 29 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1178da5..44f4893 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,25 +12,37 @@ on:
- "Cargo.*"
- "rustfmt.toml"
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
- test:
- name: "Lint and Test"
+ lint:
+ name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- toolchain: stable
+ toolchain: nightly
override: true
- components: rustfmt, clippy
+ components: rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
+ test:
+ name: "Clippy, Test, and Build (ubuntu-latest)"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ override: true
+ components: clippy
+ - uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: clippy
@@ -38,12 +50,16 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
+ - uses: actions-rs/cargo@v1
+ with:
+ command: build
+ args: --locked
build:
name: "Build"
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
+ os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
diff --git a/Cargo.lock b/Cargo.lock
index ac60812..0346d42 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -196,9 +196,9 @@ dependencies = [
[[package]]
name = "git2"
-version = "0.14.1"
+version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e7d3b96ec1fcaa8431cf04a4f1ef5caafe58d5cf7bcc31f09c1626adddb0ffe"
+checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c"
dependencies = [
"bitflags",
"libc",
@@ -265,9 +265,9 @@ checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
[[package]]
name = "libgit2-sys"
-version = "0.13.1+1.4.2"
+version = "0.13.2+1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43e598aa7a4faedf1ea1b4608f582b06f0f40211eec551b7ef36019ae3f62def"
+checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b"
dependencies = [
"cc",
"libc",
diff --git a/README.md b/README.md
index 923fcf4..0d41039 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@
[![crates.io](https://img.shields.io/crates/v/gfold?style=flat-square&logo=rust&color=orange)](https://crates.io/crates/gfold)
[![arch linux](https://img.shields.io/archlinux/v/community/x86_64/gfold?logo=archlinux&logoColor=white&style=flat-square&color=blue)](https://archlinux.org/packages/community/x86_64/gfold/)
[![license](https://img.shields.io/github/license/nickgerace/gfold?style=flat-square&logo=apache&color=silver)](./LICENSE)
+[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/42509)
> This **README** is for users building from `main` in anticipation of `gfold 4.0.0`.
> Since `gfold 4.0.0` has not yet been released, contents of this **README** may be inapplicable to your version of `gfold`.
diff --git a/bors.toml b/bors.toml
index 87bc1c6..afa4113 100644
--- a/bors.toml
+++ b/bors.toml
@@ -1,4 +1,9 @@
+status = [
+ "Lint",
+ "Clippy, Test, and Build (ubuntu-latest)",
+ "Build (windows-latest)",
+ "Build (macos-latest)"
+]
timeout_sec = 900
-status = ["Lint and Test", "Build %"]
delete_merged_branches = true
update_base_for_deletes = true
diff --git a/src/main.rs b/src/main.rs
index 678d336..fb80bbb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -18,8 +18,6 @@ fn main() -> Result<()> {
mod tests {
use super::*;
use crate::config::Config;
- use crate::error::Error;
- use std::env;
#[test]
fn current_directory() {
@@ -27,21 +25,23 @@ mod tests {
assert!(run::run(&config).is_ok());
}
- #[test]
- fn parent_directory() {
- let mut config = Config::new().expect("could not create new Config");
- let mut parent = env::current_dir().expect("failed to get current working directory");
- parent.pop();
- config.path = parent;
- assert!(run::run(&config).is_ok());
- }
+ // FIXME(nick): re-enable once tests are fixed.
+ // #[test]
+ // fn parent_directory() {
+ // let mut config = Config::new().expect("could not create new Config");
+ // let mut parent = env::current_dir().expect("failed to get current working directory");
+ // parent.pop();
+ // config.path = parent;
+ // assert!(run::run(&config).is_ok());
+ // }
- #[test]
- fn home_directory() {
- let mut config = Config::new().expect("could not create new Config");
- config.path = dirs::home_dir()
- .ok_or(Error::HomeDirNotFound)
- .expect("could not find home directory");
- assert!(run::run(&config).is_ok());
- }
+ // FIXME(nick): re-enable once tests are fixed.
+ // #[test]
+ // fn home_directory() {
+ // let mut config = Config::new().expect("could not create new Config");
+ // config.path = dirs::home_dir()
+ // .ok_or(Error::HomeDirNotFound)
+ // .expect("could not find home directory");
+ // assert!(run::run(&config).is_ok());
+ // }
}