Skip to content

Commit 6908b58

Browse files
authored
Merge pull request #92 from actix/bye-travis
Move script from Travis to Actions
2 parents 28d9c6a + 043057e commit 6908b58

File tree

8 files changed

+95
-60
lines changed

8 files changed

+95
-60
lines changed

.github/workflows/clippy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
with:
1111
toolchain: nightly
1212
components: clippy
13+
profile: minimal
1314
override: true
1415
- uses: actions-rs/clippy-check@v1
1516
with:

.github/workflows/linux.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI (Linux)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_and_test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
version:
11+
- 1.39.0
12+
- stable
13+
- nightly
14+
15+
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@master
20+
21+
- name: Install ${{ matrix.version }}
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu
25+
profile: minimal
26+
override: true
27+
28+
- name: Generate Cargo.lock
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: generate-lockfile
32+
- name: Cache cargo registry
33+
uses: actions/cache@v1
34+
with:
35+
path: ~/.cargo/registry
36+
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
37+
- name: Cache cargo index
38+
uses: actions/cache@v1
39+
with:
40+
path: ~/.cargo/git
41+
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
42+
- name: Cache cargo build
43+
uses: actions/cache@v1
44+
with:
45+
path: target
46+
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
47+
48+
- name: check build
49+
uses: actions-rs/cargo@v1
50+
with:
51+
command: check
52+
args: --all --bins --examples --tests
53+
54+
- name: tests
55+
uses: actions-rs/cargo@v1
56+
timeout-minutes: 40
57+
with:
58+
command: test
59+
args: --all --all-features --no-fail-fast -- --nocapture
60+
61+
- name: Generate coverage file
62+
if: matrix.version == 'stable' && (github.ref == 'master' || github.event_name == 'pull_request')
63+
run: |
64+
cargo install cargo-tarpaulin
65+
cargo tarpaulin --out Xml --workspace --all-features
66+
67+
- name: Upload to Codecov
68+
if: matrix.version == 'stable' && (github.ref == 'master' || github.event_name == 'pull_request')
69+
uses: codecov/codecov-action@v1
70+
with:
71+
token: ${{ secrets.CODECOV_TOKEN }}
72+
file: cobertura.xml
73+
74+
- name: Clear the cargo caches
75+
run: |
76+
cargo install cargo-cache --no-default-features --features ci-autoclean
77+
cargo-cache

.github/workflows/windows-mingw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI (Windows-gnu)
1+
name: CI (Windows-mingw)
22

33
on: [push, pull_request]
44

.travis.yml

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

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
# Actix net [![Build Status](https://travis-ci.org/actix/actix-net.svg?branch=master)](https://travis-ci.org/actix/actix-net) [![codecov](https://codecov.io/gh/actix/actix-net/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-net) [![Join the chat at https://gitter.im/actix/actix](https://badges.gitter.im/actix/actix.svg)](https://gitter.im/actix/actix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1+
# Actix net [![codecov](https://codecov.io/gh/actix/actix-net/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-net) [![Join the chat at https://gitter.im/actix/actix](https://badges.gitter.im/actix/actix.svg)](https://gitter.im/actix/actix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
22

33
Actix net - framework for composable network services
44

5+
## Build statuses
6+
7+
| Platform | Build Status |
8+
| ---------------- | ------------ |
9+
| Linux | [![build status](https://github.com/actix/actix-net/workflows/CI%20%28Linux%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix-net/actions?query=workflow%3A"CI+(Linux)") |
10+
| macOS | [![build status](https://github.com/actix/actix-net/workflows/CI%20%28macOS%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix-net/actions?query=workflow%3A"CI+(macOS)") |
11+
| Windows | [![build status](https://github.com/actix/actix-net/workflows/CI%20%28Windows%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix-net/actions?query=workflow%3A"CI+(Windows)") |
12+
| Windows (MinGW) | [![build status](https://github.com/actix/actix-net/workflows/CI%20%28Windows-mingw%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix-net/actions?query=workflow%3A"CI+(Windows-mingw)") |
13+
514
## Documentation & community resources
615

716
* [Chat on gitter](https://gitter.im/actix/actix)

actix-server/tests/test_server.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
use std::io::Read;
21
use std::sync::atomic::{AtomicUsize, Ordering::Relaxed};
32
use std::sync::{mpsc, Arc};
43
use std::{net, thread, time};
54

6-
use actix_codec::{BytesCodec, Framed};
7-
use actix_rt::net::TcpStream;
85
use actix_server::Server;
96
use actix_service::fn_service;
10-
use bytes::Bytes;
117
use futures::future::{lazy, ok};
12-
use futures::SinkExt;
138
use net2::TcpBuilder;
149

1510
fn unused_addr() -> net::SocketAddr {
@@ -73,6 +68,12 @@ fn test_listen() {
7368
#[test]
7469
#[cfg(unix)]
7570
fn test_start() {
71+
use actix_codec::{BytesCodec, Framed};
72+
use actix_rt::net::TcpStream;
73+
use bytes::Bytes;
74+
use futures::SinkExt;
75+
use std::io::Read;
76+
7677
let addr = unused_addr();
7778
let (tx, rx) = mpsc::channel();
7879

actix-service/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ categories = ["network-programming", "asynchronous"]
1111
license = "MIT/Apache-2.0"
1212
edition = "2018"
1313

14-
[badges]
15-
travis-ci = { repository = "actix/actix-service", branch = "master" }
16-
codecov = { repository = "actix/actix-service", branch = "master", service = "github" }
17-
1814
[lib]
1915
name = "actix_service"
2016
path = "src/lib.rs"
File renamed without changes.

0 commit comments

Comments
 (0)