Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Navid Yaghoobi <[email protected]>
  • Loading branch information
navidys committed Jun 30, 2024
1 parent db307d7 commit 5c3073d
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Mark stale issues and pull requests

# Please refer to https://github.com/actions/stale/blob/master/action.yml
# to see all config knobs of the stale action.

on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'A friendly reminder that this issue had no activity for 30 days.'
stale-pr-message: 'A friendly reminder that this PR had no activity for 30 days.'
stale-issue-label: 'stale-issue'
stale-pr-label: 'stale-pr'
days-before-stale: 30
days-before-close: 365
remove-stale-when-updated: true
54 changes: 54 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: validation
on:
pull_request:
push:
branches: [ main ]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]

DCO-check:
runs-on: ubuntu-latest
steps:
- name: get pr commits
id: 'get-pr-commits'
uses: tim-actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: DCO check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}

- name: check subject line length
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^.{0,72}(\n.*)*$'
error: 'Subject too long (max 72)'

codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true

validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make validate

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make test
2 changes: 1 addition & 1 deletion examples/clocksource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
for clock_src in &clocksources {
println!("name: {}", clock_src.name());
println!(
"avaiable clocksource: {}",
"available clocksource: {}",
clock_src.available_clocksource().join(" "),
);
println!("current clocksource: {}", clock_src.current_clocksource());
Expand Down
6 changes: 3 additions & 3 deletions src/sysfs/class_thermal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum ThermalZoneInfo {
Policy,
Mode,
Passive,
Unkown,
Unknown,
}

impl ThermalZoneInfo {
Expand All @@ -23,7 +23,7 @@ impl ThermalZoneInfo {
"policy" => ThermalZoneInfo::Policy,
"mode" => ThermalZoneInfo::Mode,
"passive" => ThermalZoneInfo::Passive,
_ => ThermalZoneInfo::Unkown,
_ => ThermalZoneInfo::Unknown,
}
}
}
Expand Down Expand Up @@ -136,7 +136,7 @@ pub fn collect() -> Vec<ThermalZone> {
thermal_device.zone_type = c;
}
}
ThermalZoneInfo::Unkown => {}
ThermalZoneInfo::Unknown => {}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/sysfs/clocksource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl ClocksourceInfo {
///
/// for clock_src in clocksources {
/// println!("name: {}", clock_src.name());
/// println!("avaiable clocksource: {:?}", clock_src.available_clocksource());
/// println!("available clocksource: {:?}", clock_src.available_clocksource());
/// println!("current clocksource: {}", clock_src.current_clocksource());
/// }
///
Expand Down

0 comments on commit 5c3073d

Please sign in to comment.