-
Notifications
You must be signed in to change notification settings - Fork 19
43 lines (33 loc) · 981 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: test
runs-on: ubuntu-20.04-xl
timeout-minutes: 30
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
rust-version: 1.60.0
components: clippy,rustfmt
- name: Format
run: rustfmt --check src/lib.rs
- name: Build
run: cargo build --release --all-targets --all-features
- name: Test
run: cargo test --release --all-targets --all-features
- name: Lint
run: cargo clippy --all-targets --all-features --release -- -D clippy::all
- name: Publish
if: |
github.repository == 'denoland/rust-urlpattern' &&
startsWith(github.ref, 'refs/tags/')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo publish -vv