Skip to content

Commit 3a65407

Browse files
authored
Merge pull request #242 from jonhoo/ci
Sync with rust-ci-conf
2 parents 00e6eee + e0d47b9 commit 3a65407

File tree

12 files changed

+1469
-221
lines changed

12 files changed

+1469
-221
lines changed

.github/workflows/check.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
on:
2+
push:
3+
branches: [main]
4+
pull_request:
5+
name: check
6+
jobs:
7+
fmt:
8+
runs-on: ubuntu-latest
9+
name: stable / fmt
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
submodules: true
14+
- name: Install stable
15+
uses: actions-rs/toolchain@v1
16+
with:
17+
profile: minimal
18+
toolchain: stable
19+
components: rustfmt
20+
- name: cargo fmt --check
21+
uses: actions-rs/cargo@v1
22+
with:
23+
command: fmt
24+
args: --check
25+
clippy:
26+
runs-on: ubuntu-latest
27+
name: ${{ matrix.toolchain }} / clippy
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
toolchain: [stable, beta]
32+
steps:
33+
- uses: actions/checkout@v3
34+
with:
35+
submodules: true
36+
- name: Install ${{ matrix.toolchain }}
37+
uses: actions-rs/toolchain@v1
38+
with:
39+
profile: minimal
40+
toolchain: ${{ matrix.toolchain }}
41+
default: true
42+
components: clippy
43+
- name: cargo clippy
44+
uses: actions-rs/clippy-check@v1
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
doc:
48+
runs-on: ubuntu-latest
49+
name: nightly / doc
50+
steps:
51+
- uses: actions/checkout@v3
52+
with:
53+
submodules: true
54+
- name: Install nightly
55+
uses: actions-rs/toolchain@v1
56+
with:
57+
profile: minimal
58+
toolchain: nightly
59+
default: true
60+
- name: cargo doc
61+
uses: actions-rs/cargo@v1
62+
with:
63+
command: doc
64+
args: --no-deps --all-features
65+
env:
66+
RUSTDOCFLAGS: --cfg docsrs
67+
hack:
68+
runs-on: ubuntu-latest
69+
name: ubuntu / stable / features
70+
steps:
71+
- uses: actions/checkout@v3
72+
with:
73+
submodules: true
74+
- name: Install stable
75+
uses: actions-rs/toolchain@v1
76+
with:
77+
profile: minimal
78+
toolchain: stable
79+
- name: cargo install cargo-hack
80+
uses: taiki-e/install-action@cargo-hack
81+
- name: cargo hack
82+
uses: actions-rs/cargo@v1
83+
with:
84+
command: hack
85+
args: --feature-powerset check --all-targets
86+
msrv:
87+
runs-on: ubuntu-latest
88+
# we use a matrix here just because env can't be used in job names
89+
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
90+
strategy:
91+
matrix:
92+
msrv: [1.56.1] # 2021 edition requires 1.56
93+
name: ubuntu / ${{ matrix.msrv }}
94+
steps:
95+
- uses: actions/checkout@v3
96+
with:
97+
submodules: true
98+
- name: Install ${{ matrix.toolchain }}
99+
uses: actions-rs/toolchain@v1
100+
with:
101+
profile: minimal
102+
toolchain: ${{ matrix.msrv }}
103+
default: true
104+
- name: cargo +${{ matrix.msrv }} check
105+
uses: actions-rs/cargo@v1
106+
with:
107+
command: check

.github/workflows/coverage.yml

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

.github/workflows/features.yml

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

.github/workflows/minimal.yml

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

.github/workflows/msrv.yml

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

.github/workflows/os-check.yml

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

.github/workflows/scheduled.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
on:
2+
push:
3+
branches: [main]
4+
pull_request:
5+
schedule:
6+
- cron: '7 7 * * *'
7+
name: cargo test (rolling)
8+
jobs:
9+
# https://twitter.com/mycoliza/status/1571295690063753218
10+
nightly:
11+
runs-on: ubuntu-latest
12+
name: ubuntu / nightly
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
- name: Install nightly
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
profile: minimal
21+
toolchain: nightly
22+
default: true
23+
- name: cargo generate-lockfile
24+
if: hashFiles('Cargo.lock') == ''
25+
uses: actions-rs/cargo@v1
26+
with:
27+
command: generate-lockfile
28+
- name: cargo test --locked
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: test
32+
args: --locked --features test-full-imap --all-targets
33+
services:
34+
cyrus_imapd:
35+
image: outoforder/cyrus-imapd-tester:latest
36+
ports:
37+
- 3025:25
38+
- 3143:143
39+
- 3465:465
40+
- 3993:993
41+
# https://twitter.com/alcuadrado/status/1571291687837732873
42+
update:
43+
runs-on: ubuntu-latest
44+
name: ubuntu / beta / updated
45+
# There's no point running this if no Cargo.lock was checked in in the
46+
# first place, since we'd just redo what happened in the regular test job.
47+
# Unfortunately, hashFiles only works in if on steps, so we reepeat it.
48+
# if: hashFiles('Cargo.lock') != ''
49+
steps:
50+
- uses: actions/checkout@v3
51+
with:
52+
submodules: true
53+
- name: Install beta
54+
if: hashFiles('Cargo.lock') != ''
55+
uses: actions-rs/toolchain@v1
56+
with:
57+
profile: minimal
58+
toolchain: beta
59+
default: true
60+
- name: cargo update
61+
if: hashFiles('Cargo.lock') != ''
62+
uses: actions-rs/cargo@v1
63+
with:
64+
command: update
65+
- name: cargo test
66+
if: hashFiles('Cargo.lock') != ''
67+
uses: actions-rs/cargo@v1
68+
with:
69+
command: test
70+
args: --locked --features test-full-imap --all-targets
71+
env:
72+
RUSTFLAGS: -D deprecated
73+
services:
74+
cyrus_imapd:
75+
image: outoforder/cyrus-imapd-tester:latest
76+
ports:
77+
- 3025:25
78+
- 3143:143
79+
- 3465:465
80+
- 3993:993

.github/workflows/style.yml

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

0 commit comments

Comments
 (0)