-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.66 KB
/
rust-workflow.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
53
54
55
56
57
58
59
60
61
62
63
name: Rust workflow
# Trigger the CI on any tags, pushes to any branch and PRs to any branch.
on:
push:
branches: [ "main" ]
tags: [ "*" ]
pull_request:
branches: [ "*" ]
env:
CARGO_TERM_COLOR: always
# Make sure there is no pipeline running uselessly.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Defined CI jobs.
jobs:
simple-checks:
container: docker-oss.nexus.famedly.de/rust-container:nightly
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- uses: famedly/backend-build-workflows/.github/actions/rust-prepare@main
with:
gitlab_ssh: ${{ secrets.CI_SSH_PRIVATE_KEY}}
gitlab_user: ${{ secrets.GITLAB_USER }}
gitlab_pass: ${{ secrets.GITLAB_PASS }}
- name: Caching
uses: Swatinem/rust-cache@68b3cb7503c78e67dae8373749990a220eb65352
with:
cache-on-failure: true
cache-all-crates: true
- name: Rustfmt
shell: bash
run: cargo +${NIGHTLY_VERSION} fmt -- --check
- name: Clippy
shell: bash
run: cargo +${NIGHTLY_VERSION} clippy --workspace --all-targets -- -D warnings
- name: Doc-test
shell: bash
run: cargo +${NIGHTLY_VERSION} test --doc --workspace --verbose
- name: Udeps
shell: bash
run: cargo +${NIGHTLY_VERSION} udeps
- name: Typos
shell: bash
run: typos --exclude '*.key' --exclude '*.crt' --exclude '*.csr' --exclude '*.srl'
tests:
runs-on: ubuntu-latest
uses: famedly/backend-build-workflows/.github/workflows/rust-workflow.yml@ca7b1ce0ecae9cb495f320e47d687f210a66cdda
secrets: inherit