V0.2 web api (#113)

* Adding dependencies

* Added web api code

* Some changes

* Code formatting

* Added dependencies

*   *

* Added workflow

* Changed branch to trigger workflows

* Added ssh key import

* Warning fixes
This commit was merged in pull request #113.
This commit is contained in:
KD
2025-03-30 15:00:07 -04:00
committed by GitHub
parent 9dd7ffa2b6
commit 6f320acb7c
3 changed files with 85 additions and 2 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Rust CI
on:
push:
branches: [ "v0.2" ] # Changed from main to master
pull_request:
branches: [ "v0.2" ] # Changed from main to master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Rust 1.85.0
uses: actions-rs/toolchain@v1
with:
toolchain: 1.85.0
components: clippy, rustfmt
override: true
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build
run: |
mkdir -p ~/.ssh
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitea_deploy_key
chmod 600 ~/.ssh/gitea_deploy_key
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
eval $(ssh-agent -s)
ssh-add -v ~/.ssh/gitea_deploy_key
cargo build --verbose --release
- name: Run tests
run: cargo test --verbose
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run rustfmt
run: cargo fmt --all -- --check