Skip to content

Commit 2124a5a

Browse files
committed
Add GitHub Actions CI workflow and badges
1 parent 9f71f2e commit 2124a5a

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
ruby-version: ['3.1', '3.2', '3.3']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Ruby ${{ matrix.ruby-version }}
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: ${{ matrix.ruby-version }}
24+
bundler-cache: true
25+
26+
- name: Download model files
27+
run: |
28+
mkdir -p data
29+
curl -sL "https://huggingface.co/khasinski/ai-bouncer/resolve/main/embedding_model.onnx" -o data/embedding_model.onnx
30+
curl -sL "https://huggingface.co/khasinski/ai-bouncer/resolve/main/vocab.json" -o data/vocab.json
31+
curl -sL "https://huggingface.co/khasinski/ai-bouncer/resolve/main/tokenizer_config.json" -o data/tokenizer_config.json
32+
curl -sL "https://huggingface.co/khasinski/ai-bouncer/resolve/main/config.json" -o data/config.json
33+
curl -sL "https://huggingface.co/khasinski/ai-bouncer/resolve/main/vectors.bin" -o data/vectors.bin
34+
curl -sL "https://huggingface.co/khasinski/ai-bouncer/resolve/main/labels.json" -o data/labels.json
35+
36+
- name: Run tests
37+
run: bundle exec rspec
38+
39+
- name: Build gem
40+
run: gem build ai_bouncer.gemspec

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# AiBouncer
22

3+
[![CI](https://github.com/khasinski/ai_bouncer/actions/workflows/ci.yml/badge.svg)](https://github.com/khasinski/ai_bouncer/actions/workflows/ci.yml)
4+
[![Gem Version](https://badge.fury.io/rb/ai_bouncer.svg)](https://badge.fury.io/rb/ai_bouncer)
5+
36
AI-powered HTTP request classification for Ruby on Rails. Detect credential stuffing, SQL injection, XSS, and other attacks using ML embeddings.
47

58
## Features

0 commit comments

Comments
 (0)