diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4dd1560 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose diff --git a/.github/workflows/rustbuild.yml b/.github/workflows/rustbuild.yml deleted file mode 100644 index 684fa67..0000000 --- a/.github/workflows/rustbuild.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Linux Build Rust - -on: - pull_request: - branches: - - master - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Build - run: cargo build --release --verbose -# - name: Run tests -# run: cargo test --release --verbose diff --git a/README.md b/README.md index f9356dd..7cc20bd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # 🗳️ ElectionGuard Verifier -![package](https://github.com/microsoft/electionguard-verifier/workflows/Linux%20Build%20Rust/badge.svg) +[![CI](https://github.com/microsoft/electionguard-verifier/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/electionguard-verifier/actions/workflows/ci.yml) [![license](https://img.shields.io/github/license/microsoft/electionguard-verifier)](LICENSE) This repository contains a reference implementation of a verifier for the diff --git a/tests/unencrypted.json b/tests/elections/unencrypted.json similarity index 100% rename from tests/unencrypted.json rename to tests/elections/unencrypted.json diff --git a/tests/json.rs b/tests/json.rs index 5b7a709..e93a2d9 100644 --- a/tests/json.rs +++ b/tests/json.rs @@ -9,7 +9,7 @@ use electionguard_verify::schema; #[test] fn test_parsing() -> Result<(), Box> { - for file in fs::read_dir("tests/")? { + for file in fs::read_dir("tests/records/")? { let file = file?; if let Some(ext) = file.path().extension() { if ext == "json" { diff --git a/tests/invalid_randomized.json b/tests/records/invalid_randomized.json similarity index 100% rename from tests/invalid_randomized.json rename to tests/records/invalid_randomized.json diff --git a/tests/invalid_three_different_broken_proofs.json b/tests/records/invalid_three_different_broken_proofs.json similarity index 100% rename from tests/invalid_three_different_broken_proofs.json rename to tests/records/invalid_three_different_broken_proofs.json diff --git a/tests/valid_encrypted.json b/tests/records/valid_encrypted.json similarity index 100% rename from tests/valid_encrypted.json rename to tests/records/valid_encrypted.json