Skip to content

Commit 78c8ec6

Browse files
committed
Update CI to test on stable
1 parent 75a0caf commit 78c8ec6

File tree

1 file changed

+54
-40
lines changed

1 file changed

+54
-40
lines changed

.github/workflows/CI.yml

+54-40
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
name: CI
2-
on: [push, pull_request]
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
env:
8+
RUST_BACKTRACE: 1
39

410
jobs:
511
style:
612
name: Check Style
713
runs-on: ubuntu-latest
814
steps:
9-
- uses: actions/checkout@master
10-
- name: Install Rust
11-
run: rustup update beta && rustup default beta
12-
- name: Install Rustfmt
13-
run: rustup component add rustfmt
14-
- name: Check formatting
15-
run: cargo fmt --all -- --check
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
18+
- name: Install Rust
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: stable
23+
override: true
24+
components: rustfmt
25+
26+
- name: cargo fmt --check
27+
uses: actions-rs/cargo@v1
28+
with:
29+
command: fmt
30+
args: --all -- --check
1631

1732
test:
1833
name: Test
@@ -25,47 +40,46 @@ jobs:
2540
rust:
2641
- nightly
2742
- beta
28-
# - stable
43+
- stable
2944
steps:
30-
- uses: actions/checkout@master
31-
- name: Install Rust
32-
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
45+
- name: Checkout
46+
uses: actions/checkout@v1
47+
48+
- name: Install Rust (${{ matrix.rust }})
49+
uses: actions-rs/toolchain@v1
50+
with:
51+
profile: minimal
52+
toolchain: ${{ matrix.rust }}
53+
override: true
54+
3355
- name: Install libssl-dev
3456
run: sudo apt-get update && sudo apt-get install libssl-dev
3557
- name: Build without unstable flag
36-
run: cargo build
37-
- name: Test examples in README
38-
run: rustdoc --test README.md -L target/debug -L target/debug/deps
58+
uses: actions-rs/cargo@v1
59+
with:
60+
command: build
61+
3962
- name: Check with unstable flag
40-
run: cargo check --features unstable
63+
uses: actions-rs/cargo@v1
64+
with:
65+
command: check
66+
args: --features unstable
67+
4168
- name: Run lib tests and doc tests
42-
run: RUST_TEST_THREADS=1 cargo test
69+
uses: actions-rs/cargo@v1
70+
with:
71+
command: test
72+
4373
- name: Run integration tests
44-
run: cargo test -p h2-tests
74+
uses: actions-rs/cargo@v1
75+
with:
76+
command: test
77+
args: -p h2-tests
78+
4579
- name: Run h2spec
46-
# Run h2spec on nightly for the time being.
47-
# TODO: Change it to stable after Rust 1.38 release
4880
run: ./ci/h2spec.sh
49-
if: matrix.rust == 'nightly'
81+
if: matrix.rust == 'stable'
82+
5083
- name: Check minimal versions
5184
run: cargo clean; cargo update -Zminimal-versions; cargo check
5285
if: matrix.rust == 'nightly'
53-
54-
publish_docs:
55-
name: Publish Documentation
56-
needs: [style, test]
57-
runs-on: ubuntu-latest
58-
steps:
59-
- uses: actions/checkout@master
60-
- name: Install Rust
61-
run: rustup update beta && rustup default beta
62-
- name: Build documentation
63-
run: cargo doc --no-deps --all-features
64-
- name: Publish documentation
65-
run: |
66-
cd target/doc
67-
git init
68-
git add .
69-
git -c user.name='ci' -c user.email='ci' commit -m 'Deploy H2 API documentation'
70-
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
71-
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'hyperium/h2'

0 commit comments

Comments
 (0)