Skip to content

Commit 505f3c2

Browse files
author
Floris Bruynooghe
authored
ci: swtich from travis to github actions (#36)
This follows our current setup in symbolicator. Do not use --locked, there is no Cargo.lock committed
1 parent 9140bdf commit 505f3c2

3 files changed

Lines changed: 151 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release/**
8+
9+
pull_request:
10+
11+
env:
12+
RUSTFLAGS: -Dwarnings
13+
14+
jobs:
15+
lints:
16+
name: Lints
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout sources
20+
uses: actions/checkout@v2
21+
22+
- name: Install rust stable toolchain
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: stable
26+
profile: minimal
27+
components: rustfmt, clippy
28+
override: true
29+
30+
- name: Cache rust cargo artifacts
31+
uses: swatinem/rust-cache@v1
32+
33+
- name: Run cargo fmt
34+
uses: actions-rs/cargo@v1
35+
with:
36+
command: fmt
37+
args: --all -- --check
38+
39+
- name: Run clippy
40+
uses: actions-rs/cargo@v1
41+
with:
42+
command: clippy
43+
args: --all-features --workspace --tests --examples
44+
45+
unit-test:
46+
name: Unit Tests
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout sources
50+
uses: actions/checkout@v2
51+
52+
- name: Install rust stable toolchain
53+
uses: actions-rs/toolchain@v1
54+
with:
55+
toolchain: stable
56+
profile: minimal
57+
override: true
58+
59+
- name: Cache rust cargo artifacts
60+
uses: swatinem/rust-cache@v1
61+
62+
- name: Run cargo test
63+
uses: actions-rs/cargo@v1
64+
with:
65+
command: test
66+
args: --workspace
67+
68+
unit-test-all-features:
69+
name: "Unit Tests - all features"
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout sources
73+
uses: actions/checkout@v2
74+
75+
- name: Install rust stable toolchain
76+
uses: actions-rs/toolchain@v1
77+
with:
78+
toolchain: stable
79+
profile: minimal
80+
override: true
81+
82+
- name: Cache rust cargo artifacts
83+
uses: swatinem/rust-cache@v1
84+
85+
- name: Run cargo test
86+
uses: actions-rs/cargo@v1
87+
with:
88+
command: test
89+
args: --workspace --all-features
90+
91+
doc-comments:
92+
name: Rust doc comments
93+
runs-on: ubuntu-latest
94+
env:
95+
RUSTDOCFLAGS: -Dwarnings
96+
steps:
97+
- name: Checkout sources
98+
uses: actions/checkout@v2
99+
100+
- name: Install rust stable toolchain
101+
uses: actions-rs/toolchain@v1
102+
with:
103+
toolchain: stable
104+
profile: minimal
105+
components: rust-docs
106+
override: true
107+
108+
- name: Cache rust cargo artifacts
109+
uses: swatinem/rust-cache@v1
110+
111+
- uses: actions-rs/cargo@v1
112+
with:
113+
command: doc
114+
args: --workspace --all-features --no-deps

.github/workflows/periodic.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Periodic CI
2+
3+
on:
4+
schedule:
5+
- cron: '11 7 * * 1,4'
6+
workflow_dispatch:
7+
8+
env:
9+
RUSTFLAGS: -Dwarnings
10+
11+
jobs:
12+
lint-and-test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
rust: [nightly, beta]
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: ${{ matrix.rust }}
24+
profile: minimal
25+
override: true
26+
components: clippy
27+
28+
- name: Run clippy ${{ matrix.rust }}
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: clippy
32+
args: --all-features --workspace --tests --examples
33+
34+
- uses: actions-rs/cargo@v1
35+
with:
36+
command: test
37+
args: --workspace --all-features

.travis.yml

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

0 commit comments

Comments
 (0)