-
Notifications
You must be signed in to change notification settings - Fork 23
99 lines (88 loc) · 2.53 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
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
name: CI
on: [ push, pull_request ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup ffmpeg
uses: AnimMouse/setup-ffmpeg@v1
- name: Show version information
run: |
ffmpeg -version
ffprobe -version
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all --lcov --output-path lcov.info
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v4
with:
file: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
e2e:
needs: [test, check_format, check_clippy]
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install npm dependencies
run: npm ci
- name: Build WebUI
run: npm run build
- name: Build
run: cargo build --all-targets --all-features --release --verbose
- name: Setup ffmpeg
uses: AnimMouse/setup-ffmpeg@v1
- name: Show version information
run: |
ffmpeg -version
ffprobe -version
- name: Run e2e tests
if: ${{ matrix.os != 'windows-latest' }}
run: npm run e2e:cluster
check_format:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Show version information
run: |
cargo --version
cargo fmt --version
- name: Cargo format
run: cargo fmt --all -- --check
check_clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Install npm dependencies
run: npm ci
- name: Build WebUI
run: npm run build
- name: Show version information
run: |
cargo --version
cargo clippy --version
- name: Cargo clippy
run: cargo clippy --all-targets --all-features --workspace -- -D warnings