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

Release/2.0.0 #1317

Merged
merged 135 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
8c9aa80
New git branches setup (#1296)
goastler Jul 19, 2024
c6a9443
Cache cypress install (#1305)
goastler Jul 23, 2024
42ef8d3
Merge branch 'main' into dev
goastler Jul 23, 2024
4b5a70d
Add staging branch to workflow (#1311)
forgetso Jul 29, 2024
20c0e12
New linting (#1309)
goastler Jul 29, 2024
86400eb
fix npm script error handling (#1306)
goastler Jul 29, 2024
35e7505
fix auto merge (#1302)
goastler Jul 29, 2024
cd6b236
Remove contract calls (#1308)
HughParry Jul 29, 2024
5bff693
Removing unused deps, bumping package lock
HughParry Jul 30, 2024
fa08353
Working pow captcha with timeouts
HughParry Jul 30, 2024
42e1102
Add missing deps and bundling command for staging
forgetso Jul 30, 2024
30e686d
Remove version from docker compose files
forgetso Jul 30, 2024
70d1ec5
Use NODE_ENV var for pulling in env var file into docker compose file
forgetso Jul 30, 2024
a28b142
Add staging deploy process
forgetso Jul 30, 2024
7831942
Add staging bundle command
forgetso Jul 30, 2024
a0212ff
package lock
forgetso Jul 30, 2024
64bf575
Remove old deps.
forgetso Jul 30, 2024
802d47e
Update package-lock.json
forgetso Jul 30, 2024
f374527
Update event name
forgetso Jul 30, 2024
8793b54
Add missing dep
forgetso Jul 30, 2024
79b214c
Use latest image to create container from
forgetso Jul 30, 2024
c09b367
Use staging tag for container
forgetso Jul 30, 2024
0aac58f
Await crypto WASM blob
forgetso Jul 31, 2024
29902b7
Allow NODE_ENV to be passed into Vite config
forgetso Jul 31, 2024
f93a81b
Add load-balancer refs to tsconfigs
forgetso Jul 31, 2024
6bf009b
Allow PROSOPO_DEFAULT_ENVIRONMENT to inherit from NODE_ENV
forgetso Jul 31, 2024
7aa256d
Add some logging and change some imports
forgetso Jul 31, 2024
17983c7
exporting hardcoded provider from types
HughParry Jul 31, 2024
129be99
Cleanup linting process (#1312)
goastler Jul 31, 2024
7f9b730
Fix provider not erroring on database connection error. Add option to…
forgetso Jul 31, 2024
9ef7504
Add staging command back in
forgetso Jul 31, 2024
5a70867
deploy staging workflow to bundle branch
HughParry Jul 31, 2024
2a77f02
addit commit details for bumps
HughParry Jul 31, 2024
dad13ec
Add watchtower to provider docker compose
forgetso Jul 31, 2024
b20be8e
Don't mount missing file
forgetso Jul 31, 2024
61fa810
watch provider container only
forgetso Jul 31, 2024
eaab4ca
Change container name
forgetso Jul 31, 2024
61390ca
Use createConnection instead of connection
forgetso Aug 1, 2024
5b02bee
Fix build
forgetso Aug 1, 2024
d9717ea
Staging deploy workflow (#1314)
goastler Aug 5, 2024
81a4421
Pkg json
HughParry Aug 5, 2024
8466c4b
bump version to v2.0.0
goastler Aug 5, 2024
3951216
no build specified
HughParry Aug 5, 2024
3bbaf77
Merge branch 'staging' into release/2.0.0
forgetso Aug 5, 2024
5348243
remove deploy_X scripts
goastler Aug 5, 2024
c408692
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
goastler Aug 5, 2024
b1bbfe8
remove deploy_X scripts
goastler Aug 5, 2024
b95a62a
remove deploy_protocol script call
goastler Aug 5, 2024
a97880b
remove deploy_protocol workflow step
goastler Aug 5, 2024
ac0a6aa
remove github assets for contract
goastler Aug 5, 2024
ea6db02
remove deploy_protool
goastler Aug 5, 2024
4a08205
Use 2.0.0 everywhere
forgetso Aug 5, 2024
3116a13
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
forgetso Aug 5, 2024
190b248
Provider tests passing
HughParry Aug 5, 2024
d8f3bc6
Adding if present to cjs
HughParry Aug 5, 2024
4eab1e4
Dropping auto merge
HughParry Aug 5, 2024
65e2b41
Dropping dapp example demo
HughParry Aug 5, 2024
cff6194
fix check version bump all history available
goastler Aug 5, 2024
50503e0
Update check_version_bump.yml
goastler Aug 5, 2024
e949d6f
Update check_version_bump.yml
goastler Aug 5, 2024
8518742
Remove out of date readme
forgetso Aug 5, 2024
4ebced2
Update check_version_bump.yml
goastler Aug 5, 2024
e538432
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
goastler Aug 5, 2024
f18b989
Re-add old babel plugins
forgetso Aug 5, 2024
98b70b2
start provider
HughParry Aug 6, 2024
b96fe50
Always add the token to the form
forgetso Aug 6, 2024
ff21ed4
Supply token to onHuman function
forgetso Aug 6, 2024
29e2c69
Fix build
forgetso Aug 6, 2024
915b414
Adding button next for cypress tests
HughParry Aug 6, 2024
0918250
Fixing hanging test
HughParry Aug 6, 2024
86a84db
Fixing get dataset being broken
HughParry Aug 6, 2024
af7bcb1
Remove substrate from docker compose
forgetso Aug 6, 2024
1fa1787
Cypress tests passing
HughParry Aug 6, 2024
f802200
stop the provider workflow from falling over if the npm packages are …
forgetso Aug 6, 2024
1e3ae78
Only load the provider mock container if we built it
forgetso Aug 6, 2024
b68f60c
Try to upload screenshots
forgetso Aug 6, 2024
ca04b68
Try to store screenshots on failure
forgetso Aug 6, 2024
a61368f
Try using withinSubject:null
forgetso Aug 6, 2024
2ec1fe4
Wait for button to be visible
forgetso Aug 6, 2024
34f547c
Wait for the the API call
forgetso Aug 6, 2024
844783c
Remove wait for solution request
forgetso Aug 6, 2024
0d1d924
try to force the click
forgetso Aug 6, 2024
dc74abb
Just force, don't expect the element
forgetso Aug 6, 2024
bf2f2fe
try waiting after clicking
forgetso Aug 6, 2024
61befa1
Store videos of cypress runs
forgetso Aug 6, 2024
bed1ba6
Remove the then
forgetso Aug 6, 2024
8e9e149
Remove duplicate click
forgetso Aug 6, 2024
858d126
Fix function return type
forgetso Aug 6, 2024
82a2fec
try within
forgetso Aug 6, 2024
ddd95c3
Adding setup step for setup env in test
HughParry Aug 7, 2024
a6d7298
Add data-cy attributes if environment is not production
forgetso Aug 7, 2024
a904c21
wait for docker containers to setup env
HughParry Aug 7, 2024
44efdbc
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
forgetso Aug 7, 2024
51cfce2
Adding setup step for setup env in test
HughParry Aug 7, 2024
7282e1c
Start docker first
forgetso Aug 7, 2024
bc4d19f
Check if there are references
forgetso Aug 7, 2024
6ed8217
remove within
forgetso Aug 7, 2024
b4152cc
Try to kill processes with concurrently
forgetso Aug 7, 2024
1af2dd4
Make signature stuff less confusing
forgetso Aug 8, 2024
62ac3b4
Fix license header positions
forgetso Aug 8, 2024
edf4536
Fix tests
forgetso Aug 8, 2024
3a83cdf
Get it all working
forgetso Aug 8, 2024
6e938a6
Fix lint issues (#1318)
goastler Aug 9, 2024
fe99949
use package workspaces rather than cd'ing (#1321)
goastler Aug 9, 2024
7f5caf2
Add push to js branch again to get live staging bundle
forgetso Aug 11, 2024
1b115ce
Remove any existing procaptcha responses on human
forgetso Aug 11, 2024
8eed75c
deploy staging on push to staging
forgetso Aug 12, 2024
89ce6bf
Use duplicate JS Server for now
forgetso Aug 12, 2024
669f6e7
Silence GH warning about NoSQL injection in demo
forgetso Aug 12, 2024
9beaa38
Silence GH warning about NoSQL injection in demo
forgetso Aug 12, 2024
8b7563e
Set GH_TOKEN env
forgetso Aug 12, 2024
fc0e4a7
Remove production step for JS Server
forgetso Aug 12, 2024
50013d1
Add back command to push to js-bundle branch. Remove quotes in asset …
forgetso Aug 12, 2024
514164a
Use correct docker tag
forgetso Aug 12, 2024
a6f22a7
Try moving to its own step
forgetso Aug 12, 2024
0035f24
don't fail if nothing to commit
forgetso Aug 12, 2024
806dbff
Update provider docker run CMD
forgetso Aug 12, 2024
b92dbd1
Always pull new version of tag for provider image
forgetso Aug 12, 2024
400c5a9
Update provider CMD
forgetso Aug 12, 2024
3f033a0
Alter the verify endpoint when in non-production environments in clie…
forgetso Aug 12, 2024
4f58e79
Allow PoW captchas to be stored and counted
forgetso Aug 13, 2024
4a1258c
Removing exportData from Manager
HughParry Aug 13, 2024
81dde17
Adding synamic config for load balancer
HughParry Aug 13, 2024
4b949d8
Fix build
forgetso Aug 13, 2024
7a75dc4
fix server build
forgetso Aug 13, 2024
4ce946a
fix server again
forgetso Aug 13, 2024
7918d9e
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
forgetso Aug 13, 2024
a127542
fix provider build
forgetso Aug 13, 2024
eb8a958
Merge branch 'staging' into release/2.0.0
forgetso Aug 13, 2024
25d4bd0
Removing dangerou
HughParry Aug 13, 2024
6ff6f25
Change scale-ts type to u64 to avoid losing data
forgetso Aug 13, 2024
0c287c5
revert change to number for timestamp
forgetso Aug 13, 2024
4e89de6
make sure procaptcha-response is deleted
forgetso Aug 13, 2024
2ce41a8
Fix scheduler database name and add env option for storage schedule
forgetso Aug 13, 2024
c0557d8
Make the models available once the connection has been made
forgetso Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 0 additions & 52 deletions .eslintignore

This file was deleted.

94 changes: 0 additions & 94 deletions .eslintrc.cjs

This file was deleted.

56 changes: 28 additions & 28 deletions .github/workflows/auto_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,43 @@ jobs:
NEEDS_CONTEXT: ${{ toJson(needs) }}
INPUTS_CONTEXT: ${{ toJson(inputs) }}
run: |
echo "******************************"
echo "github:" "$GITHUB_CONTEXT"
echo "******************************"
echo "env:" "$ENV_CONTEXT"
echo "******************************"
echo "vars:" "$VARS_CONTEXT"
echo "******************************"
echo "job:" "$JOB_CONTEXT"
echo "******************************"
echo "steps:" "$STEPS_CONTEXT"
echo "******************************"
echo "runner:" "$RUNNER_CONTEXT"
echo "******************************"
echo "secrets:" "$SECRETS_CONTEXT"
echo "******************************"
echo "strategy:" "$STRATEGY_CONTEXT"
echo "******************************"
echo "matrix:" "$MATRIX_CONTEXT"
echo "******************************"
echo "needs:" "$NEEDS_CONTEXT"
echo "******************************"
echo "inputs:" "$INPUTS_CONTEXT"
echo "******************************"
echo "******************************"
echo "github:" "$GITHUB_CONTEXT"
echo "******************************"
echo "env:" "$ENV_CONTEXT"
echo "******************************"
echo "vars:" "$VARS_CONTEXT"
echo "******************************"
echo "job:" "$JOB_CONTEXT"
echo "******************************"
echo "steps:" "$STEPS_CONTEXT"
echo "******************************"
echo "runner:" "$RUNNER_CONTEXT"
echo "******************************"
echo "secrets:" "$SECRETS_CONTEXT"
echo "******************************"
echo "strategy:" "$STRATEGY_CONTEXT"
echo "******************************"
echo "matrix:" "$MATRIX_CONTEXT"
echo "******************************"
echo "needs:" "$NEEDS_CONTEXT"
echo "******************************"
echo "inputs:" "$INPUTS_CONTEXT"
echo "******************************"

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Install
run: npm i -g npm@$(cat package.json | jq -r .engines.npm)
run: npm i -g "npm@$(jq -r .engines.npm < package.json)"

- name: Enable auto-merge on PR
env:
GITHUB_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
run: |
echo "Enabling auto-merge on PR"
echo "Enabling auto-merge on PR"
cd dev/gh-actions
npm ci
PR_NUMBER=${{ github.event.number }} npx tsx src/enableAutoMerge.ts
npm i
PR_NUMBER=${{ github.event.number }} REPO=${{ github.event.repository.name }} npx tsx src/enableAutoMerge.ts
8 changes: 0 additions & 8 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ jobs:
# replace the version in all package.json files
xargs -I % sh -c "cat % | jq '.version = \"${{ github.event.inputs.version }}\"' > %.new && mv %.new %" <<< "$pkgJsons"

# find all Cargo.toml files
cargoTomls=$(find . -name Cargo.toml -prune -not -path '*/protocol/cargo-cache/*')
# replace the first version line in all Cargo.toml files
xargs -I % sh -c "sed -i '0,/version =/s/version =.*/version = \"${{ github.event.inputs.version }}\"/' %" <<< "$cargoTomls"

# rebuild typechain
npm run build:typechain

# lint
npm run lint:fix

Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: cache

on:
push:
branches: [main, dev]
branches: [main, dev, staging]
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -70,23 +70,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: npm i -g npm@$(cat package.json | jq -r .engines.npm)
- run: npm i -g "npm@$(jq -r .engines.npm < package.json)"

- run: npm ci

- run: npm -w @prosopo/protocol run rustfmt

- run: npm -w @prosopo/protocol run clippy

- run: npm -w @prosopo/protocol run build:all

- run: npm -w @prosopo/protocol run test:all

# install cypress so we don't have to do that every time
- name: Cypress install
run: |
npm i --save-dev cypress
npx cypress install
- run: npx cypress install

- run: ls -la ~/.cache/Cypress || true
- run: ls -la protocol/cargo-cache || true
Expand All @@ -108,16 +97,18 @@ jobs:
# remove all but the latest cache, leaving only the cache we just saved
- name: Cleanup caches
if: always()
env:
REF: ${{ github.event.pull_request.head.ref || github.ref }}
run: |
set -euxo pipefail # stop on errors, print commands, fail on pipe fails

set +e; gh extension install actions/gh-actions-cache; set -e
echo "Fetching list of cache key"
cacheKeys=$(gh actions-cache list --sort created-at --order desc --limit 100 -R ${{ github.repository }} --key project-cache-${{ github.event.pull_request.head.ref || github.ref }}-${{ runner.os }}-${{ runner.arch }}- | cut -f 1 | tail -n +3)
cacheKeys=$(gh actions-cache list --sort created-at --order desc --limit 100 -R "${{ github.repository }}" --key "project-cache-$REF-${{ runner.os }}-${{ runner.arch }}-" | cut -f 1 | tail -n +3)
echo caches to be removed:
echo ${cacheKeys}
echo "${cacheKeys}"
set +e
for cacheKey in $cacheKeys
do
gh actions-cache delete $cacheKey -R ${{ github.repository }} --confirm
gh actions-cache delete "$cacheKey" -R "${{ github.repository }}" --confirm
done
30 changes: 15 additions & 15 deletions .github/workflows/check_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,43 +55,43 @@ jobs:
echo "******************************"

- uses: actions/checkout@v3
with:
# all history
fetch-depth: 0

# fail-fast step to check if the version has been bumped
# when running manually, there won't be a version line change, so we need to skip this step in that case
- name: Detect version bump
run: |
set -euxo pipefail # stop on errors, print commands, fail on pipe fails

set -euxo pipefail # stop on errors, print commands, fail on pipe fails

# get the next version as the version currently set in the root package.json
NEXT=$(jq -r '.version' package.json)
echo "Next version: $NEXT"

# checkout the repo back to before this pr
git checkout ${{ github.event.before }}
# checkout the dest branch
git checkout ${{ github.event.pull_request.base.ref }}

# get the previous version as the version currently set in the root package.json in the before state
PREV=$(jq -r '.version' package.json)
echo "Previous version: $PREV"

# switch back to the current state
git switch -

# break next and previous versions into major, minor, patch
NEXT_MAJOR=$(echo $NEXT | cut -d. -f1)
NEXT_MINOR=$(echo $NEXT | cut -d. -f2)
NEXT_PATCH=$(echo $NEXT | cut -d. -f3)
PREV_MAJOR=$(echo $PREV | cut -d. -f1)
PREV_MINOR=$(echo $PREV | cut -d. -f2)
PREV_PATCH=$(echo $PREV | cut -d. -f3)
NEXT_MAJOR=$(echo "$NEXT" | cut -d. -f1)
NEXT_MINOR=$(echo "$NEXT" | cut -d. -f2)
NEXT_PATCH=$(echo "$NEXT" | cut -d. -f3)
PREV_MAJOR=$(echo "$PREV" | cut -d. -f1)
PREV_MINOR=$(echo "$PREV" | cut -d. -f2)
PREV_PATCH=$(echo "$PREV" | cut -d. -f3)

# compare the versions, checking for an *increasing* version

if [[ $NEXT_MAJOR -gt $PREV_MAJOR ]]; then
if [[ "$NEXT_MAJOR" -gt "$PREV_MAJOR" ]]; then
echo "Major version bump"
elif [[ $NEXT_MAJOR -eq $PREV_MAJOR && $NEXT_MINOR -gt $PREV_MINOR ]]; then
elif [[ "$NEXT_MAJOR" -eq "$PREV_MAJOR" && "$NEXT_MINOR" -gt "$PREV_MINOR" ]]; then
echo "Minor version bump"
elif [[ $NEXT_MAJOR -eq $PREV_MAJOR && $NEXT_MINOR -eq $PREV_MINOR && $NEXT_PATCH -gt $PREV_PATCH ]]; then
elif [[ "$NEXT_MAJOR" -eq "$PREV_MAJOR" && "$NEXT_MINOR" -eq "$PREV_MINOR" && "$NEXT_PATCH" -gt "$PREV_PATCH" ]]; then
echo "Patch version bump"
else
echo "Version not bumped / not an increasing version"
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/consistent_engine_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: consistent_engine_node

on:
pull_request:
branches: [main, dev, release/*]
branches: [main, dev, staging, release/*]
paths:
- '**/package.json'
- '.github/workflows/consistent_engine_node.yml'
Expand Down Expand Up @@ -64,19 +64,18 @@ jobs:

- uses: actions/checkout@v3

- name: Check contract version matches provider version
- name: Check node version matches
run: |
set -euxo pipefail # stop on errors, print commands, fail on pipe fails

set -euxo pipefail # stop on errors, print commands, fail on pipe fails

# find all package.json files, recursively
pkgJsons=$(find . -name package.json -prune -not -path '*/node_modules/*' -not -path '*/.next/*')

# extract the node version from the package.json files
versions=$(jq -r '.engines.node' $pkgJsons)
# find all package.json files, recursively
# extract the node version from the package.json files
versions=$(find . -name package.json -prune -not -path '*/node_modules/*' -not -path '*/.next/*' -exec jq -r '.engines.node // empty' {} \;)

# ensure all node versions are the same
if [ $(echo "$versions" | uniq | wc -l) -ne 1 ]; then
echo "Node versions are not consistent across packages"
echo "$versions"
exit 1
fi
# ensure all node versions are the same
if [ "$(echo "$versions" | uniq | wc -l)" -ne 1 ]; then
echo "Versions are not consistent across packages"
echo "$versions"
exit 1
fi
Loading
Loading