Skip to content

Commit 8a8c414

Browse files
authored
Merge pull request #47 from taiki-e/github-actions
Migrate CI to GitHub Actions
2 parents b24f169 + 7ce2a09 commit 8a8c414

File tree

4 files changed

+70
-40
lines changed

4 files changed

+70
-40
lines changed

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
env:
5+
RUSTFLAGS: -Dwarnings
6+
7+
jobs:
8+
test:
9+
name: Test
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
rust:
14+
- 1.39.0
15+
- stable
16+
- beta
17+
- nightly
18+
steps:
19+
- uses: actions/checkout@master
20+
- name: Install Rust
21+
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
22+
- name: cargo test
23+
run: cargo test
24+
- name: cargo doc
25+
run: cargo doc --no-deps
26+
27+
style:
28+
name: Style
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
component:
34+
- clippy
35+
- rustfmt
36+
steps:
37+
- uses: actions/checkout@master
38+
- name: Install Rust
39+
shell: bash
40+
run: rustup update stable && rustup default stable
41+
- name: Install component
42+
shell: bash
43+
run: rustup component add ${{ matrix.component }}
44+
- name: cargo clippy
45+
if: matrix.component == 'clippy'
46+
run: cargo clippy --all-features
47+
- name: cargo fmt
48+
if: matrix.component == 'rustfmt'
49+
run: cargo fmt -- --check
50+
51+
publish_docs:
52+
name: Publish Documentation
53+
needs: [style, test]
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@master
57+
- name: Install Rust
58+
run: rustup update stable && rustup default stable
59+
- name: Build documentation
60+
run: cargo doc --no-deps --all-features
61+
- name: Publish documentation
62+
run: |
63+
cd target/doc
64+
git init
65+
git add .
66+
git -c user.name='ci' -c user.email='ci' commit -m 'Deploy futures-timer API documentation'
67+
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
68+
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'async-rs/futures-timer'

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ authors = ["Alex Crichton <[email protected]>"]
55
edition = "2018"
66
license = "MIT/Apache-2.0"
77
readme = "README.md"
8-
repository = "https://github.com/rustasync/futures-timer"
9-
homepage = "https://github.com/rustasync/futures-timer"
8+
repository = "https://github.com/async-rs/futures-timer"
9+
homepage = "https://github.com/async-rs/futures-timer"
1010
documentation = "https://docs.rs/futures-timer"
1111
description = """
1212
Timeouts and intervals for futures.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# futures-timer
22

3-
[![Build Status](https://api.travis-ci.com/rustasync/futures-timer.svg?branch=master)](https://travis-ci.com/rustasync/futures-timer)
4-
53
[Documentation](https://docs.rs/futures-timer)
64

75
A library for working with timers, timeouts, and intervals with the `futures`

0 commit comments

Comments
 (0)