✨ weighted voting support #164
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
name: Test the election-verifier | |
on: | |
push: | |
branches: | |
- master | |
- '[0-9]+.[0-9]+.x' | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- master | |
- '[0-9]+.[0-9]+.x' | |
jobs: | |
py: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install external dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y wget sharutils openjdk-8-jdk-headless | |
wget https://scala.jfrog.io/artifactory/debian/sbt-0.13.18.deb | |
sudo dpkg -i sbt-0.13.18.deb | |
sudo update-alternatives --list java | |
sudo update-alternatives --set java /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java | |
java -version | |
- name: Install internal dependencies | |
run: | | |
export INTERNAL_GIT_VERSION="10.2.0" | |
git clone https://github.com/sequentech/tally-methods.git | |
cd tally-methods && git checkout "${INTERNAL_GIT_VERSION}" && cd .. | |
mv tally-methods/tally_methods . | |
git clone https://github.com/sequentech/tally-pipes.git | |
cd tally-pipes && git checkout "${INTERNAL_GIT_VERSION}" && cd .. | |
mv tally-pipes/ tally-pipes2 | |
mv tally-pipes2/tally_pipes . | |
mv tally-pipes2/tally-pipes . | |
# This is for caching purposes, just following the steps in | |
# https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html | |
- name: Coursier cache | |
uses: coursier/cache-action@v5 | |
- name: Build the verifier | |
run: | | |
sbt clean proguard:proguard && ./package.sh | |
# This is for caching purposes, just following the steps in | |
# https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html | |
rm -rf "$HOME/.ivy2/local" || true | |
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true | |
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.sbt -name "*.lock" -delete || true | |
- name: run unittests | |
run: | | |
python3 -m unittest | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: election-verifier-binary | |
path: ./election-verifier |