-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tally missing trustees feature (#202)
* style: remove unused imports * feat: add command to report missing trustees * feat: implement missing trustee for dummy scheme * feat: implement missing trustee for electionguard scheme * feat: add missing trustee to elections sandbox * feat: add missing trustees report to clients * fix : minor fixes and improvements * chore: bump versions * doc: update changelog * style: fix lint issues * chore: bump python and EG versions * fix: solve lint issues and broken tests * chore: upload test server log for e2e tests * test: don't use chrome for e2e tests * chore: increate e2e tests consistency * test: increase e2e timeout for compensation
- Loading branch information
Showing
78 changed files
with
1,455 additions
and
690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
LABEL author="[email protected]" | ||
|
||
# [Option] Install zsh | ||
|
@@ -19,7 +19,7 @@ ARG USERNAME=automatic | |
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN apt-get update \ | ||
RUN apt-get update --allow-releaseinfo-change \ | ||
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \ | ||
# Use Docker script from script library to set things up | ||
&& /bin/bash /tmp/library-scripts/docker-debian.sh "${ENABLE_NONROOT_DOCKER}" "/var/run/docker-host.sock" "/var/run/docker.sock" "${USERNAME}" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
name: Build electionguard | ||
runs-on: ubuntu-latest | ||
container: | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
@@ -74,7 +74,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: ${{ needs.check_python_to_js_cache.outputs.cache-hit != 'true' }} | ||
container: | ||
image: codegram/pyodide-electionguard:pyodide-0.16.1-electionguard-1.2.0 | ||
image: codegram/pyodide-electionguard:pyodide-0.16.1-electionguard-1.2.1 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
@@ -121,7 +121,7 @@ jobs: | |
needs: build_python_to_js | ||
runs-on: ubuntu-latest | ||
container: | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
services: | ||
postgres: | ||
image: postgres:11 | ||
|
@@ -234,7 +234,7 @@ jobs: | |
needs: [check_python_to_js_cache, build_python_to_js] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
services: | ||
postgres: | ||
image: postgres:11 | ||
|
@@ -314,26 +314,20 @@ jobs: | |
cd bulletin_board/server | ||
bundler exec rails db:create | ||
bundler exec rails db:migrate | ||
- name: Install Chrome | ||
- name: Install e2e tests dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 | ||
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add | ||
sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | ||
sudo apt-get -y update | ||
sudo apt-get -y install google-chrome-stable | ||
wget https://chromedriver.storage.googleapis.com/90.0.4430.24/chromedriver_linux64.zip | ||
unzip chromedriver_linux64.zip | ||
sudo mv chromedriver /usr/bin/chromedriver | ||
sudo chown root:root /usr/bin/chromedriver | ||
sudo chmod +x /usr/bin/chromedriver | ||
make install_test_e2e | ||
- name: Run e2e tests | ||
run: | | ||
cd bulletin_board/server | ||
npm run e2e:install | ||
bundle exec rails s -e test -p 5017 & | ||
make serve_test & | ||
sleep 5 | ||
npm run e2e:tests -- --browser chrome --headless | ||
make test_e2e | ||
- name: Upload artifacts (server logs) | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test server logs | ||
path: bulletin_board/server/log/ | ||
- name: Upload artifacts (screenshots) | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ env: | |
CI: "true" | ||
SIMPLECOV: "true" | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" | ||
PYTHON_VERSION: "3.8.8" | ||
|
||
defaults: | ||
run: | ||
|
@@ -23,6 +22,8 @@ jobs: | |
tests: | ||
name: Test code | ||
runs-on: ubuntu-latest | ||
container: | ||
image: codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
steps: | ||
- uses: rokroskar/[email protected] | ||
if: "github.ref != 'refs/heads/develop'" | ||
|
@@ -32,9 +33,6 @@ jobs: | |
with: | ||
fetch-depth: 1 | ||
submodules: true | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- name: Add Poetry to path | ||
run: echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This stage builds the python-wrapper package | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 as python-wrapper-builder | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 as python-wrapper-builder | ||
LABEL author="[email protected]" | ||
|
||
# Add Makefiles | ||
|
@@ -17,7 +17,7 @@ ADD voting_schemes/electionguard/python-wrapper /code/voting_schemes/electiongua | |
RUN cd /code && make build_electionguard_python_wrapper | ||
|
||
# This stage builds the pyodide packages for the previous python packages | ||
FROM codegram/pyodide-electionguard:pyodide-0.16.1-electionguard-1.2.0 as python-to-js-builder | ||
FROM codegram/pyodide-electionguard:pyodide-0.16.1-electionguard-1.2.1 as python-to-js-builder | ||
LABEL author="[email protected]" | ||
|
||
ENV PYODIDE_PACKAGES "electionguard,bulletin_board-electionguard" | ||
|
@@ -43,15 +43,15 @@ RUN make | |
RUN cp -rf /code/voting_schemes/electionguard/python-to-js/override/* /src/pyodide/build/ | ||
|
||
# This stage builds the bulletin-board application | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
LABEL author="[email protected]" | ||
|
||
# Environment variables | ||
ENV SECRET_KEY_BASE 1234 | ||
ENV RAILS_ENV production | ||
|
||
# Install system dependencies | ||
RUN apt-get update && \ | ||
RUN apt-get update --allow-releaseinfo-change && \ | ||
apt-get install -y postgresql postgresql-client postgresql-contrib libpq-dev \ | ||
redis-server memcached imagemagick ffmpeg mupdf mupdf-tools libxml2-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This stage builds the python-wrapper package | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 as python-wrapper-builder | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 as python-wrapper-builder | ||
LABEL author="[email protected]" | ||
|
||
# Add Makefiles | ||
|
@@ -17,7 +17,7 @@ ADD voting_schemes/electionguard/python-wrapper /code/voting_schemes/electiongua | |
RUN cd /code && make build_electionguard_python_wrapper | ||
|
||
# This stage builds the pyodide packages for the previous python packages | ||
FROM codegram/pyodide-electionguard:pyodide-0.16.1-electionguard-1.2.0 as python-to-js-builder | ||
FROM codegram/pyodide-electionguard:pyodide-0.16.1-electionguard-1.2.1 as python-to-js-builder | ||
LABEL author="[email protected]" | ||
|
||
ENV PYODIDE_PACKAGES "electionguard,bulletin_board-electionguard" | ||
|
@@ -43,15 +43,15 @@ RUN make | |
RUN cp -rf /code/voting_schemes/electionguard/python-to-js/override/* /src/pyodide/build/ | ||
|
||
# This stage builds the bulletin-board application | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.8-electionguard-1.2.0 | ||
FROM codegram/ruby-node-python-electionguard:ruby-2.6.6-node-15-python-3.8.11-electionguard-1.2.1 | ||
LABEL author="[email protected]" | ||
|
||
# Environment variables | ||
ENV SECRET_KEY_BASE 1234 | ||
ENV RAILS_ENV production | ||
|
||
# Install system dependencies | ||
RUN apt-get update && \ | ||
RUN apt-get update --allow-releaseinfo-change && \ | ||
apt-get install -y postgresql postgresql-client postgresql-contrib libpq-dev \ | ||
redis-server memcached imagemagick ffmpeg mupdf mupdf-tools libxml2-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.