Skip to content

Commit abc8f7c

Browse files
authored
Merge pull request #15 from Waradu/feature/check-workflow
feat: check action
2 parents b9d0f9c + 53a643d commit abc8f7c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/check.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Check Rust Project"
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
check-project:
14+
name: Check Rust Project
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@master
22+
with:
23+
toolchain: stable
24+
25+
- name: Cache Rust dependencies
26+
uses: Swatinem/rust-cache@v2
27+
with:
28+
shared-key: "rust-cache"
29+
cache-on-failure: true
30+
31+
- name: Install Linux Dependencies
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y libxkbcommon-dev libxkbcommon-x11-dev libx11-dev libvulkan-dev vulkan-validationlayers \
35+
libgtk-3-dev libgdk3.0-cil-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev \
36+
libwebkit2gtk-4.1-dev
37+
38+
- name: Run `cargo check`
39+
run: cargo check
40+
41+
- name: Run `cargo clippy`
42+
run: cargo clippy --all-targets --all-features -- -D warnings
43+
44+
- name: Run `cargo test`
45+
run: cargo test --all-features

0 commit comments

Comments
 (0)