Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
feat: add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Oct 11, 2024
1 parent 2c4782f commit ed119fa
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PR

on:
push:
branches: [main]
pull_request:
branches:
- "**"
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Formatting & Clippy
runs-on: [runs-on, runner=4cpu-linux-arm64 , "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt

- name: Run rustfmt
run: cargo fmt --all -- --check
env:
CARGO_INCREMENTAL: 1

- name: Run cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features
env:
CARGO_INCREMENTAL: 1
22 changes: 22 additions & 0 deletions .github/workflows/pr_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Lint

on:
pull_request_target:
types:
- opened
- edited

permissions:
pull-requests: read

jobs:
main:
name: Title
runs-on:
- runs-on
- runner=2cpu-linux-arm64
- run-id=${{ github.run_id }}
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ed119fa

Please sign in to comment.