Skip to content

Commit

Permalink
test github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
komar007 committed Sep 1, 2024
1 parent dc7cd8d commit d97dfa3
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/check-and-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
pull_request:
push:
branches:
- main

name: Check and Lint

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: Clippy Output
27 changes: 27 additions & 0 deletions .github/workflows/release-packaging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
branches:
- main

name: Release Packaging

jobs:
release:
name: Release Packaging
env:
PROJECT_NAME_UNDERSCORE: pidtree_mon
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Release Build
run: cargo build --release --locked
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: ${{ env.PROJECT_NAME_UNDERSCORE }}
path: target/release/${{ env.PROJECT_NAME_UNDERSCORE }}

0 comments on commit d97dfa3

Please sign in to comment.