mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
chore: add unit and style tests
This commit is contained in:
57
.github/workflows/tests.yml
vendored
Normal file
57
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Unit and style tests
|
||||
|
||||
permissions:
|
||||
actions: none
|
||||
checks: read
|
||||
contents: read
|
||||
deployments: none
|
||||
issues: none
|
||||
discussions: none
|
||||
packages: none
|
||||
pages: none
|
||||
pull-requests: read
|
||||
repository-projects: none
|
||||
security-events: none
|
||||
statuses: none
|
||||
|
||||
concurrency: # don't run the test when there's is a newer version
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- "**.rs"
|
||||
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- "**.rs"
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Test dev build
|
||||
run: cargo test
|
||||
|
||||
- name: Test release build
|
||||
run: cargo test --release
|
||||
|
||||
style-checks:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Clippy check
|
||||
run: cargo clippy -- -D
|
||||
|
||||
- name: Format check
|
||||
run: cargo fmt -- --check
|
||||
Reference in New Issue
Block a user