-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (100 loc) · 3.35 KB
/
Copy pathlint.yml
File metadata and controls
115 lines (100 loc) · 3.35 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Lint
on: [ push, pull_request ]
permissions:
contents: read
jobs:
lint:
name: Cargo clippy & fmt
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: block
allowed-endpoints: >
archive.ubuntu.com:80
azure.archive.ubuntu.com:80
crates.io:443
esm.ubuntu.com:443
github.com:443
index.crates.io:443
motd.ubuntu.com:443
ppa.launchpadcontent.net:443
security.ubuntu.com:80
static.crates.io:443
static.rust-lang.org:443
- name: Install Dependencies (Linux)
run: sudo apt-get install -y libgtk-3-dev libglib2.0-dev build-essential
if: matrix.os == 'ubuntu-latest'
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Rust toolchain
run: rustup show && rustup update
- name: cargo fmt
run: cargo fmt -- --check
- name: cargo clippy
run: cargo clippy --all-features --tests -- -D warnings
udeps:
name: Unused dependencies
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: block
allowed-endpoints: >
archive.ubuntu.com:80
azure.archive.ubuntu.com:80
api.github.com:443
crates.io:443
esm.ubuntu.com:443
github.com:443
index.crates.io:443
motd.ubuntu.com:443
objects.githubusercontent.com:443
ppa.launchpadcontent.net:443
security.ubuntu.com:80
static.crates.io:443
static.rust-lang.org:443
- name: Install Dependencies (Linux)
run: sudo apt-get install -y libgtk-3-dev libglib2.0-dev build-essential
if: matrix.os == 'ubuntu-latest'
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@53c04d3685fcc3ca67ce478eb9c2ea5c051a4a63 # nightly
- name: Install cargo-udeps
run: cargo install cargo-udeps --locked
- name: Run udeps
run: cargo +nightly udeps
audit:
name: Cargo Audit
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
crates.io:443
github.com:443
index.crates.io:443
static.crates.io:443
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Cargo Audit
run: cargo install cargo-audit
- name: Run Cargo Audit
run: cargo audit