diff --git a/.github/workflows/anubis-eval-cd.yaml b/.github/workflows/anubis-eval-cd.yaml index 65b6c99..a275f2c 100644 --- a/.github/workflows/anubis-eval-cd.yaml +++ b/.github/workflows/anubis-eval-cd.yaml @@ -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 diff --git a/.github/workflows/anubis-eval-ci.yaml b/.github/workflows/anubis-eval-ci.yaml new file mode 100644 index 0000000..a65e0aa --- /dev/null +++ b/.github/workflows/anubis-eval-ci.yaml @@ -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 diff --git a/.github/workflows/hermes-tests-cd.yaml b/.github/workflows/hermes-tests-cd.yaml index e31f6ff..84aef83 100644 --- a/.github/workflows/hermes-tests-cd.yaml +++ b/.github/workflows/hermes-tests-cd.yaml @@ -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 diff --git a/.github/workflows/hermes-tests-ci.yaml b/.github/workflows/hermes-tests-ci.yaml index e8a5236..0df15d6 100644 --- a/.github/workflows/hermes-tests-ci.yaml +++ b/.github/workflows/hermes-tests-ci.yaml @@ -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 diff --git a/anubis-eval/.dockerignore b/anubis-eval/.dockerignore index 1100d38..31d1385 100644 --- a/anubis-eval/.dockerignore +++ b/anubis-eval/.dockerignore @@ -5,6 +5,7 @@ README.md .idea/ target/ logs/ +tests/ .env* .gitignore eval-lb/ \ No newline at end of file diff --git a/anubis-eval/tests/common/mod.rs b/anubis-eval/tests/common/mod.rs new file mode 100644 index 0000000..cc79cab --- /dev/null +++ b/anubis-eval/tests/common/mod.rs @@ -0,0 +1,3 @@ +pub fn setup() { + // This function is used to setup the test environment +} \ No newline at end of file diff --git a/anubis-eval/tests/integration_test.rs b/anubis-eval/tests/integration_test.rs new file mode 100644 index 0000000..319f07b --- /dev/null +++ b/anubis-eval/tests/integration_test.rs @@ -0,0 +1,7 @@ +mod common; + +#[tokio::test] +async fn test_example() { + common::setup(); + assert_eq!(2 + 2, 4); +} \ No newline at end of file