Skip to content

Commit

Permalink
ci: add basic cargo test/clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Apr 12, 2024
1 parent a1a83b4 commit 7d742a9
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Continuous integration

on:
- push
- pull_request

jobs:
changelog:
name: Changelog
runs-on: ubuntu-latest

outputs:
changelog: ${{ steps.changed-files.outputs.all_changed_files }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

run_unitary_tests:
name: Run clippy and unitary tests
runs-on: ubuntu-latest

needs: changelog
if: |
contains(needs.changelog.outputs.changelog, 'src') ||
contains(needs.changelog.outputs.changelog, 'Cargo.toml')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy

- name: Cargo clippy
uses: actions-rs/clippy@master

- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Continuos Integration](https://github.com/rogercoll/pid-set/actions/workflows/test.yaml//badge.svg?branch=main)](https://github.com/rogercoll/pid-set/actions/workflows/test.yaml?query=branch%3Amain)
[![dependency status](https://deps.rs/repo/github/rogercoll/pid-set/status.svg)](https://deps.rs/repo/github/rogercoll/pid-set)

# PID Set Library

The `pid_set` library provides tools for managing and monitoring process identifiers (PIDs) using epoll on Linux platforms. It utilizes epoll and pidfd to asynchronously notify when a process exits, offering a robust way to handle PID-related events.
Expand Down

0 comments on commit 7d742a9

Please sign in to comment.