Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
Merge #45
Browse files Browse the repository at this point in the history
45: Add GitHub Action workflow r=samueldple a=samueldple

Marked WIP until bors-ng/bors-ng#730 is resolved

Co-authored-by: samueldple <44178347+samueldple@users.noreply.github.com>
Co-authored-by: samueldple <samueldple@gmail.com>
  • Loading branch information
3 people committed Sep 3, 2019
2 parents ce8f6f1 + 7be9d6e commit 7117f45
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/rust.yml
@@ -0,0 +1,16 @@
name: Rust

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Check Formatting
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Expand Up @@ -23,6 +23,7 @@ Code in this repository is held to a high standard, but don't let that put you o

These good practices are enforced by the following procedures:

- Continuous Integration is used to check that code is formatted correctly and all works as expected.
- All PRs will be reviewed by a maintainer. Here, suggestions will be made on how to improve the code until it is agreed that it is of the required standard.
- Bors will be used to merge all PRs. This ensures that the `master` branch is always green.
- Dependabot will ensure dependencies are kept up to date.
2 changes: 1 addition & 1 deletion bors.toml
@@ -1,3 +1,3 @@
status = ["continuous-integration/travis-ci/push"]
status = ["Build"]
pr-status = ["License Compliance", "WIP"]
delete-merged-branches = true
13 changes: 7 additions & 6 deletions src/date_tuple.rs
Expand Up @@ -241,11 +241,13 @@ impl DateTuple {
pub fn from_days(mut total_days: u32) -> Result<DateTuple, String> {
let mut years = 0u16;
let mut months = 1u8;
while total_days > if date_utils::is_leap_year(years) {
DAYS_IN_A_LEAP_YEAR
} else {
DAYS_IN_A_COMMON_YEAR
} {
while total_days
> if date_utils::is_leap_year(years) {
DAYS_IN_A_LEAP_YEAR
} else {
DAYS_IN_A_COMMON_YEAR
}
{
total_days -= if date_utils::is_leap_year(years) {
DAYS_IN_A_LEAP_YEAR
} else {
Expand Down Expand Up @@ -398,5 +400,4 @@ mod tests {
tuple4.previous_date()
);
}

}
1 change: 0 additions & 1 deletion src/month_tuple.rs
Expand Up @@ -248,5 +248,4 @@ mod tests {
let date = DateTuple::new(2000, 5, 10).unwrap();
assert_eq!(MonthTuple { y: 2000, m: 5 }, MonthTuple::from(date));
}

}
1 change: 0 additions & 1 deletion src/time_tuple.rs
Expand Up @@ -493,5 +493,4 @@ mod tests {
assert_eq!(58, tuple.m);
assert_eq!(59, tuple.s);
}

}

0 comments on commit 7117f45

Please sign in to comment.