-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.4 KB
/
rust.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: RustyServer-CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- run: |
echo "::group::[📁] - Current project -> $GITHUB_REPOSITORY"
echo "[🚀] - Project version -> $version"
echo "[🧪] - CI Actor -> $GITHUB_ACTOR (commit $GITHUB_SHA)"
echo "::endgroup::"
env:
version: 0.1.0
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build
run: cargo build --verbose
lint-clippy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust and Clippy
run: |
rustup component add clippy
cargo clippy
- name: Run tests
run: cargo test
- name: Build release
run: cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: report-lintcov
path: ./.github/workflows/artifacts/report-lintcov.txt