Skip to content

Commit

Permalink
chore: query updates, documentation, tests (#41)
Browse files Browse the repository at this point in the history
* chore: update test data

* chore: move vendor specific functionality, allow cache bypass

* chore: formatting, clippy, disable debug code

* fix: include subsequent success if first was a failure

* chore: add documentation, unit tests and test job for PRs

* chore: fmt and clippy

* chore: more clippy
  • Loading branch information
Wolftousen authored Sep 18, 2024
1 parent 44d132f commit a359cc9
Show file tree
Hide file tree
Showing 11 changed files with 21,792 additions and 918 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ RUST_LOG=reqwest=debug
GITHUB_ORG=
GITHUB_TOKEN=
LOKI_DAYS_BATCH_SIZE=5
PRODUCTION_ENVIRONMENT_NAMES=production,prod
SERVICE_NAME=github
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust CI

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build and run tests
run: |
cargo build --verbose
cargo test --verbose
6 changes: 6 additions & 0 deletions src/helpers/event_vendor.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use super::loki::ValueItem;

pub trait EventVendorFunctions {
fn extract_change_url(entry: &ValueItem) -> String;
fn extract_deployment_url(entry: &ValueItem) -> String;
}
Loading

0 comments on commit a359cc9

Please sign in to comment.