forked from deps-rs/deps.rs
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 946 Bytes
/
premerge.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
44
45
name: Premerge
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main]
schedule:
- cron: 0 0 1 * *
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: install Rust
uses: actions-rust-lang/[email protected]
- name: check
run: cargo check
- name: test
run: cargo test
linting:
if: ${{ github.ref != 'main' }}
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: install Rust
uses: actions-rust-lang/[email protected]
with: { components: rustfmt, clippy }
- name: format
run: cargo fmt --all -- --check
- name: clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings