Skip to content

Commit

Permalink
ops(anubis): setup ci pipeline for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
WarriorsSami committed Jun 22, 2024
1 parent 42b6341 commit 1557733
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/anubis-eval-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,30 @@ jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache rust dependencies
uses: Swatinem/rust-cache@v2

- name: Setup rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: '1.72.0'

- name: Build
run: |
cd anubis-eval
cargo build --release
- name: Test
run: |
cd anubis-eval
cargo test --all-features
deploy:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/anubis-eval-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Anubis - Build and Test Submissions Service

on:
push:
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-ci.yaml"

pull_request:
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-ci.yaml"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache rust dependencies
uses: Swatinem/rust-cache@v2

- name: Setup rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: '1.72.0'

- name: Build
run: |
cd anubis-eval
cargo build --release
- name: Test
run: |
cd anubis-eval
cargo test --all-features
3 changes: 2 additions & 1 deletion .github/workflows/hermes-tests-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: dart-lang/setup-dart@v1
- name: Setup dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.2

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/hermes-tests-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: dart-lang/setup-dart@v1
- name: Setup dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.2

Expand Down
1 change: 1 addition & 0 deletions anubis-eval/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ README.md
.idea/
target/
logs/
tests/
.env*
.gitignore
eval-lb/
3 changes: 3 additions & 0 deletions anubis-eval/tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub fn setup() {
// This function is used to setup the test environment
}
7 changes: 7 additions & 0 deletions anubis-eval/tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mod common;

#[tokio::test]
async fn test_example() {
common::setup();
assert_eq!(2 + 2, 4);
}

0 comments on commit 1557733

Please sign in to comment.