35 lines
836 B
YAML
35 lines
836 B
YAML
name: Lint and Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-build:
|
|
runs-on: docker
|
|
container:
|
|
image: rust:1.83-bullseye
|
|
steps:
|
|
- name: Install Node.js
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y curl gnupg
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y nodejs
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y pkg-config libssl-dev
|
|
|
|
- name: Run Clippy
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
|
|
- name: Build Rust project
|
|
run: cargo build --release
|
|
|
|
- name: Test Rust project
|
|
run: cargo test --verbose
|