Skip to content

Commit

Permalink
Merge pull request #1 from dedefer/ci
Browse files Browse the repository at this point in the history
ci
  • Loading branch information
dedefer authored May 22, 2021
2 parents b754aff + 2b0ec87 commit 11bb566
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on: [push]

name: test and publish

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --lib --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- id: coverage
uses: actions-rs/[email protected]
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}
publish:
if: ${{ contains(github.ref, 'refs/tags/v') && needs.test.result == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ CRATES_IO_TOKEN }}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
![MIT licensed](https://img.shields.io/github/license/dedefer/tokio_schedule?style=for-the-badge)
[![Version](https://img.shields.io/crates/v/tokio_schedule?style=for-the-badge)](https://crates.io/crates/tokio_schedule/)
![Code Coverage](https://img.shields.io/coveralls/github/dedefer/tokio_schedule/main?style=for-the-badge)
![Downloads](https://img.shields.io/crates/d/tokio_schedule?style=for-the-badge)

This crate provides a library for scheduling periodic tasks.
It is inspired by python's [schedule](https://pypi.org/project/schedule/) lib and provides similar API.
It is built on tokio (version 1) and chrono lib
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub trait Job: Sized + Sync {
func().await;
}};

Pin::from(Box::new(fut))
Box::pin(fut)
}
}

Expand Down

0 comments on commit 11bb566

Please sign in to comment.