Skip to content

Commit

Permalink
github: action: Add linterchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin authored and joaoantoniocardoso committed Jun 6, 2024
1 parent 68b3b9c commit c0a2d76
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test all targets

on: [push, pull_request]

permissions:
contents: write

jobs:
quick-tests:
runs-on: ubuntu-22.04
steps:
- name: Install build dependencies
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: |
curl \
git
- name: Checkout
uses: actions/checkout@v4

- name: Set directory to safe for git
# Note: Required by vergen (https://crates.io/crates/vergen)
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: Install build dependencies - Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Check style
run: cargo fmt --check

- name: Check clippy
run: cargo clippy --all-features

- name: Build
run: cargo build --verbose

0 comments on commit c0a2d76

Please sign in to comment.