-
Notifications
You must be signed in to change notification settings - Fork 532
52 lines (48 loc) · 1.4 KB
/
rust-test.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
46
47
48
49
50
51
52
name: Rust CI
on:
pull_request:
types: [ opened, synchronize, edited ]
paths:
- 'tuta-sdk/**'
- '.github/workflows/rust-test.yml'
push:
branches:
- dev-*
- '*/dev'
jobs:
test:
runs-on: ubuntu-latest
permissions:
actions: none
checks: none
contents: read
deployments: none
id-token: none
issues: none
discussions: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: setup rust
run: |
# Specify an exact Rust version.
#
# Newer versions will enable newer features, but at the same time, you may get newer warnings which you have
# to fix. This should be a manual step.
rustup install 1.83.0
rustup default 1.83.0
rustup component add rustfmt clippy
- name: sdk format
working-directory: tuta-sdk/rust
run: cargo fmt --check
- name: sdk warning check with clippy
working-directory: tuta-sdk/rust
run: cargo clippy --package tuta-sdk --no-deps -- -Dwarnings # -Dwarnings changes warnings to errors so that the check fails
- name: sdk tests
working-directory: tuta-sdk/rust
run: cargo test