Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to debug the cd4t multi commit before merging it in the baseline #395

Open
wants to merge 335 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
c04242d
fix: fix Go tests
PascalinDe Nov 21, 2023
79f72a4
refactor: use internationalize function
PascalinDe Nov 22, 2023
c08ba79
refactor: remove debugging
PascalinDe Nov 22, 2023
e4285ce
refactor: remove dead code
PascalinDe Nov 22, 2023
dd70671
Fix French lexicon
dragonleman Nov 23, 2023
f632702
fix: updated local_forms script w/ current data format
PascalinDe Nov 23, 2023
97b98be
tests: add German translations
PascalinDe Nov 23, 2023
eef4e35
Merge pull request #61 from c4dt/fix_tests
ineiti Nov 24, 2023
4434db3
Correctly create new keys
ineiti Nov 24, 2023
ca91ba8
Décrypt* -> Déchiffr*
dragonleman Nov 24, 2023
ea49694
Merge pull request #63 from c4dt/fix-fr-language-syntaxes
PascalinDe Nov 24, 2023
7f8c477
Merge pull request #51 from c4dt/316
PascalinDe Nov 24, 2023
e702098
Merge pull request #64 from c4dt/fix_scripts
ineiti Nov 24, 2023
db280d3
Homogeinization of acronyms
dragonleman Nov 27, 2023
9fb741e
Merge pull request #65 from c4dt/fix-languages-homogeneization-acronyms
dragonleman Nov 27, 2023
23d1ad5
test: install and initialize Playwright
PascalinDe Dec 1, 2023
b85f7d8
test: add initalizing i18next
PascalinDe Dec 1, 2023
7cb3d62
test: add login/logout utils
PascalinDe Dec 1, 2023
260175d
fix: add missing import
PascalinDe Dec 1, 2023
24c8f2f
test: add navigation bar tests for authenticated/admin users
PascalinDe Dec 1, 2023
a3f146a
fix: remove duplicate logo
PascalinDe Dec 4, 2023
16a75f3
test: start each test at 'About' page
PascalinDe Dec 4, 2023
b114a4c
test: added test for link to form list
PascalinDe Dec 4, 2023
c718085
docs: added README for automated tests
PascalinDe Dec 4, 2023
c8023cc
fix: do not include SCIPER_ADMIN in filename as it might be different…
PascalinDe Dec 4, 2023
bf17a92
fix: clean up Playwright config
PascalinDe Dec 4, 2023
96ce8a5
fix: use fixed admin sciper for mocks
PascalinDe Dec 4, 2023
d75b181
fix: add missing API mock
PascalinDe Dec 4, 2023
715edbf
docs: updated README w/ installation instructions and required enviro…
PascalinDe Dec 5, 2023
a4b412d
WIP: fix log in/log out mocks
PascalinDe Dec 5, 2023
df1111e
fix: fix log in/log out helper functions
PascalinDe Dec 5, 2023
0e6c079
docs: add mandatory FRONT_END_URL value to READMEs
PascalinDe Dec 5, 2023
b50a584
test: clean up authentication mocks
PascalinDe Dec 7, 2023
8db9f9e
test: clean up HAR file management and authentication mocking
PascalinDe Dec 7, 2023
990cb43
test: add authentication UI tests
PascalinDe Dec 7, 2023
75f5bdd
docs: add updating HAR files to README
PascalinDe Dec 7, 2023
a46a0fb
fix: apply code review suggestions
PascalinDe Dec 8, 2023
a51d8a9
test: do not test WebKit
PascalinDe Dec 8, 2023
9f6222b
test: use hard-coded baseURL instead of local configuration
PascalinDe Dec 8, 2023
a7fe8fb
test: apply review suggestions
PascalinDe Dec 8, 2023
bc582d3
fix: re-add accidentally removed mockPersonalInfo in setUp function
PascalinDe Dec 8, 2023
b251113
fix: use regexp for local configuration
PascalinDe Dec 8, 2023
707f2d6
docs: fix npm command in README
PascalinDe Dec 8, 2023
e9b84b7
docs: fix npx command
PascalinDe Dec 8, 2023
6cfb410
Merge pull request #67 from c4dt/playwright
PascalinDe Dec 11, 2023
8314d64
test: add missing skip instructions
PascalinDe Dec 11, 2023
444d787
Merge pull request #74 from c4dt/playwright
PascalinDe Dec 11, 2023
7200375
fix: remove duplicate hidden element
PascalinDe Dec 5, 2023
976e908
test: move updating mocks toggle to setUp
PascalinDe Dec 11, 2023
fab2989
test: add testid to footer
PascalinDe Dec 11, 2023
9f396ec
feat: render copyright notice in footer internationalisable
PascalinDe Dec 11, 2023
7ab1f0d
feat: remove unused proxy configuration element
PascalinDe Dec 11, 2023
83f4eee
feat: internationalise build/software information and add tests
PascalinDe Dec 11, 2023
fbc6666
Merge pull request #75 from c4dt/69
PascalinDe Dec 12, 2023
945821c
refactor: rename file
PascalinDe Dec 12, 2023
84c7bfc
Revert "test: move updating mocks toggle to setUp"
PascalinDe Dec 12, 2023
7a27a9f
docs: remove deprecated comments
PascalinDe Dec 12, 2023
90c78a6
test: add api/config/proxy mock
PascalinDe Dec 12, 2023
ff8f696
test: add missing await on test result
PascalinDe Dec 12, 2023
844943b
feat: add linting to tests
PascalinDe Dec 12, 2023
20646e2
fix: fix linter
PascalinDe Dec 12, 2023
fddc36b
test: add missing skip instructions to footer tests
PascalinDe Dec 12, 2023
2369d9c
refactor: use 'strict' mode when compiling tests
PascalinDe Dec 13, 2023
0863d1d
Merge pull request #76 from c4dt/playwright
PascalinDe Dec 13, 2023
59eb6d3
test: add evoting API mock
PascalinDe Dec 12, 2023
055c2f3
test: add /form/index route tests for navbar/footer
PascalinDe Dec 13, 2023
be17e64
fix: fix misleading page numbering and add pagination tests
PascalinDe Dec 13, 2023
628cf71
refactor: simplify mocking by removing reliance on HAR files
PascalinDe Dec 14, 2023
d6c136a
fix: fix lint
PascalinDe Dec 14, 2023
d30dbe2
style: add missing type annotations
PascalinDe Dec 15, 2023
a5e99b6
Merge pull request #77 from c4dt/70
PascalinDe Dec 18, 2023
b9909be
style: prettify JSON
PascalinDe Dec 15, 2023
6b8a420
test: add form list display tests
PascalinDe Dec 15, 2023
f660579
test: do not actually load page to check URL
PascalinDe Jan 8, 2024
7c62d80
test: assert unauthenticated form list views are correct
PascalinDe Jan 8, 2024
96dcb5a
test: fix malformatted test data
PascalinDe Jan 11, 2024
380b157
test: admin cannot vote on same form as non-admin
PascalinDe Jan 11, 2024
ee64e2b
test: add form list display tests
PascalinDe Jan 11, 2024
5956f1d
style: fix linting
PascalinDe Jan 11, 2024
1b03a2f
test: apply code review suggestions
PascalinDe Jan 17, 2024
d28bec3
test: disable lint to make code more readable
PascalinDe Jan 17, 2024
c8339fa
Merge pull request #79 from c4dt/playwright
PascalinDe Jan 18, 2024
1cea2f6
Updating cli tools tests to use new dela
ineiti Jan 22, 2024
d59f5e3
Merge pull request #84 from c4dt/update_latest_dela
ineiti Jan 23, 2024
da3dd7b
chore: fix missing command in set up script
PascalinDe Jan 24, 2024
fda3bcd
Merge pull request #88 from c4dt/docker
PascalinDe Jan 24, 2024
28aad92
fix: make sure the pages are properly loaded
PascalinDe Jan 16, 2024
ea18d14
test: add new test data
PascalinDe Jan 16, 2024
97315e3
test: add initial tests for form editing
PascalinDe Jan 16, 2024
345927b
test: move api mocks to separate folders
PascalinDe Jan 16, 2024
56425a2
test: move evoting mocks
PascalinDe Jan 16, 2024
981b74f
test: added 2nd admin user for ownership tests
PascalinDe Jan 18, 2024
6498f8b
test: wait until there's no more network traffic on reload
PascalinDe Jan 22, 2024
e4746f0
fix: do not show 'Add voters' button to non-owner
PascalinDe Jan 25, 2024
107a297
Fix the voting-benchmark test
ineiti Jan 19, 2024
9c1f6ed
Rearranging things
ineiti Jan 19, 2024
9b93346
refactor: applied code review
PascalinDe Jan 25, 2024
cbbb92c
chore: do not run tests in parallel
PascalinDe Jan 25, 2024
7fcd939
fix: fix array index
PascalinDe Jan 25, 2024
8a55e11
Autogenerating .env
ineiti Jan 25, 2024
a2a262a
Merge pull request #89 from c4dt/72
PascalinDe Jan 25, 2024
fa9c0d4
Merge pull request #92 from c4dt/autogenerate_env
ineiti Jan 25, 2024
6ada22a
Merge pull request #82 from c4dt/voting_benchmark
ineiti Jan 25, 2024
f6045da
Merge pull request #83 from c4dt/refactoring
ineiti Jan 25, 2024
90dd236
refactor: renamed JSON file to be coherent w/ test file
PascalinDe Jan 25, 2024
c3e5c9b
fix: 'Cancel' button must only be visible to owner
PascalinDe Jan 25, 2024
e6d8fa7
fix: 'Close' button should only be visible to owner
PascalinDe Jan 25, 2024
b39748a
fix: 'Combine' button should only be visible to owner
PascalinDe Jan 25, 2024
c203ac0
docs: cleaned up README, removed obsolete files and updated .env.example
PascalinDe Jan 25, 2024
baa48d9
Merge pull request #93 from c4dt/cleanup
PascalinDe Jan 26, 2024
4f13b54
test: only show 'Delete' button to owner
PascalinDe Jan 29, 2024
6e10918
test: show 'Shuffle' button only to owner
PascalinDe Jan 29, 2024
3287685
fix: show 'Setup' button only to owner
PascalinDe Jan 31, 2024
e8c5e82
test: show 'Open' button only to owner
PascalinDe Jan 31, 2024
b4adf69
fix: show 'Initialize' button only to owner
PascalinDe Jan 31, 2024
46e991d
fix: show 'Decrypt' button only to owner
PascalinDe Jan 31, 2024
2a4116e
fix: reload page to update local caches when authorizations have changed
PascalinDe Feb 6, 2024
0d353b8
Merge pull request #96 from c4dt/playwright
PascalinDe Feb 7, 2024
4e833be
test: test that buttons are not visible in form states when they are …
PascalinDe Feb 7, 2024
adb9a7b
test: clean up test messages
PascalinDe Feb 7, 2024
1bac17b
test: add missing 'Canceled' state
PascalinDe Feb 7, 2024
525aaa8
test: add 'Vote' button test cases
PascalinDe Feb 7, 2024
18e6069
test: add initialization tests
PascalinDe Feb 7, 2024
312a3f9
test: add 'Setup' route calling test
PascalinDe Feb 8, 2024
7a80f95
test: add 'Open' route calling test
PascalinDe Feb 8, 2024
857c1f7
test: add 'Cancel' route calling test
PascalinDe Feb 8, 2024
f1784a1
test: refactor button tests and add tests for remaining buttons
PascalinDe Feb 9, 2024
65ed665
test: test adding voters
PascalinDe Feb 9, 2024
9180c8c
test: fix voting test
PascalinDe Feb 9, 2024
184bffa
fix: add missing route mocks
PascalinDe Feb 12, 2024
8a98808
style: fix linting warnings
PascalinDe Feb 12, 2024
e3364c7
fix: add missing file
PascalinDe Feb 13, 2024
36b99cf
refactor: apply review suggestions
PascalinDe Feb 13, 2024
36b9486
style: fix linter
PascalinDe Feb 13, 2024
aca09c9
Merge pull request #100 from c4dt/72
PascalinDe Feb 14, 2024
1a89820
Fix all go version in the tests on 1.19
ineiti Feb 15, 2024
f0fabf1
Merge pull request #116 from c4dt/fix_go_version
ineiti Feb 15, 2024
f77be25
Fixing some warnings
ineiti Feb 15, 2024
a34cf3a
Don't let non-form-owner add voters
ineiti Feb 15, 2024
ed3df34
Running crash tests up to three times
ineiti Feb 15, 2024
9667bff
Merge pull request #115 from c4dt/block_admin_changes
ineiti Feb 15, 2024
424cdff
refactor: move auth tools to separate location at root
PascalinDe Feb 13, 2024
d4fb1b3
fix: non-voter user should not be able to see voting screen
PascalinDe Feb 14, 2024
1a32df8
Merge pull request #117 from c4dt/99
PascalinDe Feb 15, 2024
b4e3c36
test: add tests for handling minimum/maximum/correct number of votes …
PascalinDe Feb 15, 2024
a0abffd
fix: fix test w/ non-unique identifier
PascalinDe Feb 15, 2024
9e6df75
Merge pull request #120 from c4dt/playwright
PascalinDe Feb 16, 2024
4a0b3a6
Merge pull request #119 from c4dt/rerun_crash_tests
ineiti Feb 16, 2024
b5ad03e
Merge pull request #118 from c4dt/fix_warnings
ineiti Feb 16, 2024
6e40d7d
style: remove unused JSON file
PascalinDe Feb 16, 2024
bb7d2ae
refactor: add another result
PascalinDe Feb 16, 2024
57d0a32
fix: fix result labels
PascalinDe Feb 18, 2024
4a55280
test: add tests individual/grouped results
PascalinDe Feb 20, 2024
801594b
test: add more detailed forms
PascalinDe Feb 22, 2024
18be67e
feat: show total count instead of percentage and order by count
PascalinDe Feb 23, 2024
c819e31
Merge pull request #123 from c4dt/45
PascalinDe Feb 26, 2024
889e22b
Putting ballots in separate memory
ineiti Feb 28, 2024
76d53c1
Making tests work
ineiti Feb 28, 2024
b9ab490
Comments and error handling
ineiti Feb 28, 2024
5b507f7
Improve speed of docker build
ineiti Feb 28, 2024
9fab649
Add voting script to the backend
ineiti Feb 28, 2024
d0c8171
Putting FormFromStore into a single place
ineiti Feb 28, 2024
492dff8
Correctly store and retrieve DKGs
ineiti Feb 28, 2024
df648a3
Synching is now done in dela
ineiti Feb 28, 2024
4027d1c
Making tests pass
ineiti Feb 28, 2024
d34d817
Merge pull request #121 from c4dt/separate_ballots
ineiti Mar 1, 2024
c8744e9
Point to latest c4dt/dela commit
ineiti Mar 1, 2024
ae9e179
Merge pull request #132 from c4dt/e2e_fixes
ineiti Mar 1, 2024
29befd9
feat: update smart contract
PascalinDe Feb 26, 2024
4149979
feat: add URL field to choices
PascalinDe Feb 26, 2024
8980696
fix: fix internalisation problems w/ text results
PascalinDe Mar 1, 2024
56676a3
refactor: refactor choice display
PascalinDe Mar 1, 2024
26e0700
style: ran prettier
PascalinDe Mar 1, 2024
af1c47a
Merge pull request #133 from c4dt/37
PascalinDe Mar 1, 2024
dca5d2c
Following latest dela main and fixing local_forms.sh with new JSON fo…
ineiti Mar 5, 2024
9b166e5
Merge pull request #136 from c4dt/update_dela
ineiti Mar 5, 2024
e8be7d9
feat: add EPFL logo w/ link to EPFL homepage
PascalinDe Mar 4, 2024
bb5ac07
feat: use Arial font
PascalinDe Mar 4, 2024
125f539
feat: change bg color to EPFL style
PascalinDe Mar 4, 2024
eb9a48b
feat: change fg color to EPFL style
PascalinDe Mar 4, 2024
28118ec
feat: add URL to smart contract
PascalinDe Mar 5, 2024
15ab531
feat: add title URL to frontend
PascalinDe Mar 5, 2024
9b1fa5d
feat: use EPFL link style
PascalinDe Mar 5, 2024
0497f33
fix: fix missing Title field when not 'en' language
PascalinDe Mar 5, 2024
4ca033c
fix: fix missing title link
PascalinDe Mar 5, 2024
56fbba5
test: add EPFL logo test
PascalinDe Mar 5, 2024
0063e64
fix: fix missing build stage
PascalinDe Mar 5, 2024
818aeb5
Merge pull request #137 from c4dt/docker
PascalinDe Mar 6, 2024
d628971
Merge pull request #135 from c4dt/42
PascalinDe Mar 6, 2024
7e02bb9
fix: fix inverted hyperlink colours
PascalinDe Mar 6, 2024
6a40c80
fix: fix English not displaying by default for Title fields
PascalinDe Mar 6, 2024
54f8d07
Merge pull request #139 from c4dt/frontend
ineiti Mar 6, 2024
a0ad98e
fix: fix unhandled update
PascalinDe Mar 7, 2024
a384645
fix: fix color scheme
PascalinDe Mar 7, 2024
779ba47
Merge pull request #140 from c4dt/frontend
PascalinDe Mar 7, 2024
3742ba9
Adding benchmark tests
ineiti Mar 7, 2024
7fa61de
feat: add AdditionalInfo field to smart contract
PascalinDe Mar 7, 2024
7d60164
Merge pull request #146 from c4dt/add_speeds
ineiti Mar 8, 2024
c4ec900
feat: add AdditionalInfo field to frontend
PascalinDe Mar 7, 2024
cffd74b
Merge pull request #147 from c4dt/141
PascalinDe Mar 8, 2024
e08107a
adding versions
ineiti Mar 8, 2024
1a93da5
fix: add missing JSON/schema validation
PascalinDe Mar 8, 2024
d35ce4c
Merge pull request #149 from c4dt/frontend
PascalinDe Mar 8, 2024
f8d78b8
Merge pull request #148 from c4dt/version_display
ineiti Mar 8, 2024
c1477bc
Put throw outside of try/catch
ineiti Mar 12, 2024
f9d43fe
Merge pull request #150 from c4dt/increase_timeout
ineiti Mar 15, 2024
094e3e9
[fix] when directory is a symlink
multiscan Apr 17, 2024
8dfd2fc
[feat] chunked voter sciper upload
multiscan Apr 17, 2024
b9060ec
[doc] explain why we add sendVoters async function
multiscan Apr 17, 2024
5c76450
style: fixed linting
PascalinDe Apr 18, 2024
857299f
feat: add error messages
PascalinDe Apr 23, 2024
7248aa0
feat: add loading animation when adding voters
PascalinDe Apr 24, 2024
e648bc2
feat: use translations for error messages
PascalinDe Apr 24, 2024
71e887b
fix: clean-up error handling
PascalinDe Apr 30, 2024
2610d4f
fix: remove outdated comment
PascalinDe Apr 30, 2024
1b90a30
fix: add missing call
PascalinDe Apr 30, 2024
ca99a06
style: apply linting
PascalinDe Apr 30, 2024
015e8e2
fix: fix SCIPER verification and add it to adding policy functions
PascalinDe May 1, 2024
5f42309
feat: do not link to form management view for non-admin users
PascalinDe May 2, 2024
4205520
feat: require authentication as admin to access form management view
PascalinDe May 2, 2024
5218665
Merge pull request #158 from c4dt/156
PascalinDe May 3, 2024
3f2ed9d
fix: use Number.isNaN
PascalinDe May 6, 2024
6f748b2
fix: add missing await statements
PascalinDe May 6, 2024
19e40f2
Merge pull request #157 from c4dt/feat_batch_voters
PascalinDe May 7, 2024
b4f9ff7
Fix French language: at most -> au plus
dragonleman May 8, 2024
28ad738
Merge pull request #160 from c4dt/fix-french-language-at-most-au-plus
PascalinDe May 13, 2024
b56fbc6
Updating scripts
ineiti May 13, 2024
0ce24ab
Merge pull request #161 from c4dt/update_scripts
ineiti May 13, 2024
fb3090e
feat: clarify size computation
PascalinDe Jun 24, 2024
c66decd
fix: use length of encoded ID to determine total length of ballot
PascalinDe Jun 24, 2024
c122b11
feat: throw error if encoded ballot is longer than maximum ballot siz…
PascalinDe Jun 25, 2024
e0003ec
docs: updated documentation on ballot encoding
PascalinDe Jun 25, 2024
5b03fe8
Merge pull request #168 from c4dt/167
PascalinDe Jun 25, 2024
e1fbd8f
feat: change default filter on form list to 'Open'
PascalinDe Jul 1, 2024
f95d249
Merge pull request #169 from c4dt/change-default-filter
PascalinDe Jul 1, 2024
0cfc407
Only pushing if merge on main
ineiti Jul 3, 2024
572e945
Merge pull request #171 from c4dt/test_docker_build
ineiti Jul 3, 2024
0437042
feat: hide elections on blocklist
PascalinDe Jul 9, 2024
7cd2cf3
refactor: minor code clean-up
PascalinDe Jul 10, 2024
db54223
Merge pull request #173 from c4dt/hide-elections
PascalinDe Jul 10, 2024
cc596ec
fix: add '-y' flag to make sure apt builds autonomously
PascalinDe Oct 10, 2024
31da190
Merge pull request #180 from c4dt/fix-docker
ineiti Oct 10, 2024
d5b6a9e
Moving paths from github.com/c4dt to github.com/dedis
ineiti Oct 10, 2024
4bf8710
@Pierluca's and @jbsv's comments
ineiti Oct 10, 2024
5ca296c
Merge pull request #181 from c4dt/comments_dedis
ineiti Oct 10, 2024
0cfa3ac
Merge pull request #389 from c4dt/main
ineiti Oct 10, 2024
37ad9b7
upgrade to golang 1.23
jbsv Dec 9, 2024
74c9286
change github.com to go.dedis.ch
jbsv Dec 10, 2024
618628c
IgnoreTestCrash for now
jbsv Dec 16, 2024
4205474
upgrade docker github actions tools
jbsv Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is an example .env file with default passwords and private keys.
# Do not use this in production or with any public-facing ports!
BACKEND_HOST=backend # name of the 'backend' container
BACKEND_PORT=5000 # port of the 'backend' container
COMPOSE_FILE=./docker-compose/docker-compose.yml # Docker Compose configuration file to use
DATABASE_HOST=db # name of the PostgreSQL container
DATABASE_PASSWORD=Ohw0phoa # choose any PostgreSQL password
DATABASE_PORT=5432 # port of the PostgreSQL container
DATABASE_USERNAME=dvoting
DB_PATH=dvoting # LMDB database path
DELA_PROXY_URL=http://172.19.44.254:8080 # IP and port of one of the DELA containers
FRONT_END_URL=http://127.0.0.1:3000 # the automated frontend tests expect this value do not change it
NODEPORT=2000 # DELA node port
# For public-facing services and production, this key needs to be changed!
PRIVATE_KEY=6aadf480d068ac896330b726802abd0da2a5f3824f791fe8dbd4cd555e80b809
PROXYPORT=8080 # DELA proxy port
PUBLIC_KEY=3e5fcaed4c5d79a8eccceeb087ee0a13b8f91d917ed62017a9cd28e13b228389
REACT_APP_DEV_LOGIN=true # debugging admin login /!\ disable in production /!\
REACT_APP_RANDOMIZE_VOTE_ID=true # randomize voter ID for debugging /!\ disable in production /!\
REACT_APP_SCIPER_ADMIN=123456 # debugging admin ID /!\ disable in production /!\
REACT_APP_BLOCKLIST= # comma-separad form IDs to hide from non-admin users
SESSION_SECRET=kaibaaF9 # choose any secret
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Thank you for opening a pull request with this project, please also:

* [ ] add a brief description of your changes here
* [ ] assign the PR to yourself, or to the person(s) working on it
* [ ] start in `draft` mode and `in progress` pipeline in the project (if applicable)
* [ ] if applicable, add this PR to its related issue by one of the special keywords [Closing keywords](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue)
* once it's ready
* [ ] put it in the `Review` or `Ready4Merge` pipeline in the project (if applicable)
* [ ] remove `draft`
* [ ] assign a reviewer
67 changes: 67 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build docker

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
build-docker:
name: Build D-Voting Docker images
runs-on: ubuntu-22.04
env:
DockerTag: latest
push: ${{ (github.ref == 'refs/heads/main') && 'true' || 'false' }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set env
run: |
git describe --tags
echo "REACT_APP_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "REACT_APP_BUILD=$(git describe --tags)" >> $GITHUB_ENV
echo "REACT_APP_BUILD_TIME=$(date)" >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: ${{ env.push == 'true' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Frontend
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfiles/Dockerfile.frontend
platforms: linux/amd64
build-args: |
REACT_APP_VERSION
REACT_APP_BUILD
REACT_APP_BUILD_TIME
push: ${{ env.push }}
tags: ghcr.io/dedis/d-voting-frontend:${{ env.DockerTag }}
- name: Build Backend
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfiles/Dockerfile.backend
platforms: linux/amd64
push: ${{ env.push }}
tags: ghcr.io/dedis/d-voting-backend:${{ env.DockerTag }}
- name: Build D-Voting
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfiles/Dockerfile.dela
platforms: linux/amd64
push: ${{ env.push }}
tags: ghcr.io/dedis/d-voting-dela:${{ env.DockerTag }}
8 changes: 4 additions & 4 deletions .github/workflows/go_dvoting_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: Scenario
runs-on: ubuntu-latest
steps:
- name: Set up Go ^1.17
uses: actions/setup-go@v2
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: ^1.17
go-version: '1.23'

- name: Install crypto util from Dela
run: |
Expand All @@ -24,7 +24,7 @@ jobs:
go install ./cli/crypto

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create a private key
run: crypto bls signer new --save private.key
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/go_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,63 @@ on:

jobs:
integration:
name: Integration test
name: Integration tests
runs-on: ubuntu-latest
steps:
- name: Set up Go ^1.17
uses: actions/setup-go@v2
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: ^1.17
go-version: '1.23'

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run the integration test
run: go test -timeout 10m -run TestIntegration ./integration/...
bad_vote:
name: Test bad vote
runs-on: ubuntu-latest
steps:
- name: Set up Go ^1.17
uses: actions/setup-go@v2
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: ^1.17
go-version: '1.23'

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run the bad vote test
run: go test -timeout 10m -run TestBadVote ./integration/...
crash:
name: Test crash
runs-on: ubuntu-latest
steps:
- name: Set up Go ^1.17
uses: actions/setup-go@v2
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: ^1.17
go-version: '1.23'

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run the crash test
run: go test -timeout 10m -run TestCrash ./integration/...
run: |
for a in $( seq 3 ); do
echo "Testing sequence $a"
go test -timeout 10m -run TestCrash ./integration/... && exit 0
done
exit 1
revote:
name: Test revote
runs-on: ubuntu-latest
steps:
- name: Set up Go ^1.17
uses: actions/setup-go@v2
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: ^1.17
go-version: '1.23'

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run the revote test
run: go test -timeout 10m -run TestRevote ./integration/...
8 changes: 4 additions & 4 deletions .github/workflows/go_scenario_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go ^1.17
uses: actions/setup-go@v2
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: ^1.17
go-version: '1.23'

- name: Install crypto util from Dela
run: |
Expand All @@ -23,7 +23,7 @@ jobs:
go install ./cli/crypto

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create a private key
run: crypto bls signer new --save private.key
Expand Down
48 changes: 9 additions & 39 deletions .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,22 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Use Go >= 1.19
uses: actions/setup-go@v3
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: '>=1.19'
go-version: '1.23'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run lint
run: make lint

# TODO: https://github.com/dedis/d-voting/issues/392
# - name: Run lint
# run: make lint
#
- name: Run vet
run: make vet

- name: Test all, except integration, with coverage
run: |
go test -json -covermode=count -coverprofile=profile.cov $(go list ./... | grep -v /integration) 2>&1 | tee report.json

- name: Sonarcloud scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=dedis
-Dsonar.projectKey=dedis_d-voting
-Dsonar.go.tests.reportPaths=report.json
-Dsonar.go.coverage.reportPaths=profile.cov
-Dsonar.coverage.exclusions=**/*_test.go,/internal/**/*
-Dsonar.issue.ignore.multicriteria=e1
-Dsonar.issue.ignore.multicriteria.e1.ruleKey=*Naming*
-Dsonar.issue.ignore.multicriteria.e1.resourceKey=**/*_test.go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true

# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
go test $(go list ./... | grep -v /integration)
8 changes: 4 additions & 4 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use go
uses: actions/setup-go@v3
- name: Use Go 1.23
uses: actions/setup-go@v4
with:
go-version: '>=1.18'
go-version: '1.23'

- name: Install fpm
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/web_backend_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
working-directory: ./web/backend

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/web_frontend_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
working-directory: ./web/frontend

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ nodedata/

deb-package/dist/**

.env

dela/
bin/
nodes/
cookies.txt
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Latest changes in each category go to the top

## [Unreleased]

### Added
- dev_login can change userId when clicking on the user in the upper right
- admin can now add users as voters
- New debugging variables in [local_vars.sh](./scripts/local_vars.sh)
- Changelog - please use it

### Changed
- for the Dockerfiles and docker-compose.yml, `DELA_NODE_URL` has been replaced with `DELA_PROXY_URL`,
which is the more accurate name.
- the actions in package.json for the frontend changed. Both are somewhat development mode,
as the webserver is not supposed to be used in production.
- `start`: starts in plain mode
- `start-https`: starts in HTTPS mode

### Deprecated
### Removed
### Fixed
- Proxy editing fixed: adding, modifying, deleting now works
- When fetching form and user updates, only do it when showing the activity
- Redirection when form doesn't exist and nicer error message
- File formatting and errors in comments
- Popup when voting and some voting translation fixes
- Fixed return error when voting

### Security
- Use `REACT_APP_RANDOMIZE_VOTE_ID === 'true'` to indicate randomizing vote ids
3 changes: 2 additions & 1 deletion Dockerfiles/Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ FROM node:20-bookworm
WORKDIR /web/backend
COPY ../web/backend .
RUN npm install
ENTRYPOINT ["/bin/bash", "-c", "npm start"]
ENTRYPOINT ["npm"]
CMD ["start"]
Loading
Loading