Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: port Pilkki software client to Rust #7

Merged
merged 9 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
labels: ["dependabot"]
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
labels: ["dependabot-ci"]
schedule:
interval: "weekly"
91 changes: 0 additions & 91 deletions .github/workflows/pilkki-software-multiplatform.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/rust-cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check cargo deny

on:
pull_request:
push:
branches:
- main
- stable

jobs:
cargo-deny:
name: Cargo deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories

continue-on-error: ${{ matrix.checks == 'advisories' }}

steps:
- name: Checkout Sources
uses: actions/[email protected]

- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}

41 changes: 41 additions & 0 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Rust clippy

on:
pull_request:
push:
branches:
- main
- stable

jobs:
linter:
name: Cargo clippy
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: Install `libudev`
run: sudo apt-get install -y libudev-dev

- name: Rust Cache
uses: Swatinem/[email protected]

- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
35 changes: 35 additions & 0 deletions .github/workflows/rust-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rustfmt

on:
pull_request:
push:
branches:
- main
- stable

jobs:
rustfmt:
name: Cargo fmt
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: cargo fmt
run: cargo fmt --all -- --check
44 changes: 44 additions & 0 deletions .github/workflows/rust-test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Rust test

on:
pull_request:
push:
branches:
- main
- stable

jobs:
check:
name: Cargo test on macos
runs-on: macos-latest
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: 0.9

- name: Rust Cache
uses: Swatinem/[email protected]

- name: cargo nextest
run: cargo nextest run
47 changes: 47 additions & 0 deletions .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Rust test

on:
pull_request:
push:
branches:
- main
- stable

jobs:
check:
name: Cargo test
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: Install `libudev`
run: sudo apt-get install -y libudev-dev

- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: 0.9

- name: Rust Cache
uses: Swatinem/[email protected]

- name: cargo nextest
run: cargo nextest run
36 changes: 36 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Semantic PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
# By default, these PR titles are allowed:
# https://github.com/commitizen/conventional-commit-types
name: Validate PR title
runs-on: ubuntu-latest
steps:

# Documentation: https://github.com/amannn/action-semantic-pull-request
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
major
feat
fix
chore
docs
style
refactor
test
build
ci
revert
validateSingleCommit: true
wip: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
/target
Loading
Loading