Skip to content

Commit 7c1dca2

Browse files
committed
ci: configuration basic github action
Signed-off-by: Jeremie Drouet <[email protected]>
1 parent fcf44b5 commit 7c1dca2

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/workflows/code-checking.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: common
2+
3+
on:
4+
merge_group:
5+
types: [checks_requested]
6+
workflow_call:
7+
pull_request:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
code-checking:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions-rs/toolchain@v1
18+
with:
19+
toolchain: nightly
20+
profile: minimal
21+
components: rustfmt,clippy
22+
- name: run lint
23+
run: cargo fmt --all --check
24+
- name: run check
25+
run: cargo check --all-features --tests
26+
- name: run clippy
27+
run: cargo clippy --all-targets --all-features --tests

.github/workflows/testing.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: testing
2+
3+
on:
4+
merge_group:
5+
types: [checks_requested]
6+
workflow_call:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
paths:
12+
- "Cargo.*"
13+
- "src/**"
14+
- "tests/**"
15+
16+
jobs:
17+
testing:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: install cargo toolchain
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: stable
27+
profile: minimal
28+
29+
- run: cargo test
30+
31+
- name: install wasm-pack
32+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
33+
34+
- run: wasm-pack test --headless --firefox
35+
- run: wasm-pack test --headless --chrome

src/metadata.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::len_without_is_empty)]
2+
13
use std::io::{Error, ErrorKind, Result};
24
use std::path::Path;
35
use std::time::{Duration, SystemTime, UNIX_EPOCH};

0 commit comments

Comments
 (0)