From 4a0af9882ee6a5c4f835cde9d2fb164fc5de44ea Mon Sep 17 00:00:00 2001 From: Spencer Wilson <5624115+spencerwilson@users.noreply.github.com> Date: Fri, 28 Jan 2022 06:44:15 -0800 Subject: [PATCH 1/4] fix tests --- tests/{ => elections}/unencrypted.json | 0 tests/json.rs | 2 +- tests/{ => records}/invalid_randomized.json | 0 tests/{ => records}/invalid_three_different_broken_proofs.json | 0 tests/{ => records}/valid_encrypted.json | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename tests/{ => elections}/unencrypted.json (100%) rename tests/{ => records}/invalid_randomized.json (100%) rename tests/{ => records}/invalid_three_different_broken_proofs.json (100%) rename tests/{ => records}/valid_encrypted.json (100%) 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 From e2a290644e6992ba764cc145dec75be806f2416f Mon Sep 17 00:00:00 2001 From: Spencer Wilson <5624115+spencerwilson@users.noreply.github.com> Date: Fri, 28 Jan 2022 06:44:46 -0800 Subject: [PATCH 2/4] replace workflow with Rust starter workflow --- .github/workflows/rustbuild.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rustbuild.yml b/.github/workflows/rustbuild.yml index 684fa67..7ae98f3 100644 --- a/.github/workflows/rustbuild.yml +++ b/.github/workflows/rustbuild.yml @@ -1,9 +1,13 @@ -name: Linux Build Rust +name: Rust on: + push: + branches: [ main ] pull_request: - branches: - - master + branches: [ main ] + +env: + CARGO_TERM_COLOR: always jobs: build: @@ -11,8 +15,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Build - run: cargo build --release --verbose -# - name: Run tests -# run: cargo test --release --verbose + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From 5f3b1c0a6e1acd592108447525882557b493de98 Mon Sep 17 00:00:00 2001 From: Spencer Wilson <5624115+spencerwilson@users.noreply.github.com> Date: Fri, 28 Jan 2022 07:07:01 -0800 Subject: [PATCH 3/4] update badge in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f9356dd..a5e3fa6 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/rustbuild.yml/badge.svg)](https://github.com/microsoft/electionguard-verifier/actions/workflows/rustbuild.yml) [![license](https://img.shields.io/github/license/microsoft/electionguard-verifier)](LICENSE) This repository contains a reference implementation of a verifier for the From 43e263528ee252c0ef0a77ed096db0263b18d157 Mon Sep 17 00:00:00 2001 From: Spencer Wilson <5624115+spencerwilson@users.noreply.github.com> Date: Fri, 28 Jan 2022 07:17:28 -0800 Subject: [PATCH 4/4] rename workflow to "CI" --- .github/workflows/{rustbuild.yml => ci.yml} | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{rustbuild.yml => ci.yml} (96%) diff --git a/.github/workflows/rustbuild.yml b/.github/workflows/ci.yml similarity index 96% rename from .github/workflows/rustbuild.yml rename to .github/workflows/ci.yml index 7ae98f3..4dd1560 100644 --- a/.github/workflows/rustbuild.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Rust +name: CI on: push: diff --git a/README.md b/README.md index a5e3fa6..7cc20bd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # 🗳️ ElectionGuard Verifier -[![CI](https://github.com/microsoft/electionguard-verifier/actions/workflows/rustbuild.yml/badge.svg)](https://github.com/microsoft/electionguard-verifier/actions/workflows/rustbuild.yml) +[![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