-
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.
Merge pull request #26 from upstash/migrate_compatibility_checks
migrate tests and dependabot
- Loading branch information
Showing
2 changed files
with
261 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: 2 | ||
updates: | ||
|
||
# Python packages | ||
- package-ecosystem: "pip" | ||
directory: "/examples/using-huey" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/examples/using-apscheduler" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/examples/using-celery" | ||
schedule: | ||
interval: "daily" | ||
|
||
|
||
# Ruby packages | ||
- package-ecosystem: "bundler" | ||
directory: "/examples/using-sidekiq" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "bundler" | ||
directory: "/examples/using-resque" | ||
schedule: | ||
interval: "daily" | ||
|
||
|
||
# Rust packages | ||
- package-ecosystem: "cargo" | ||
directory: "/examples/using_redis-rs" | ||
schedule: | ||
interval: "daily" |
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 |
---|---|---|
@@ -0,0 +1,224 @@ | ||
name: Compatibility Tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'compatible-libraries' | ||
|
||
schedule: | ||
- cron: "0 12 * * *" | ||
# run everyday at 12.00 | ||
|
||
jobs: | ||
|
||
sidekiq: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./examples/using-sidekiq | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Ruby and dependencies | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1' | ||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle install | ||
shell: bash | ||
- name: run | ||
continue-on-error: true | ||
run: | | ||
timeout 50s bundle exec sidekiq -r ./sendEmail.rb 2>&1 | tee sampleLogs2.log | bash client.sh | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Compare outputs | ||
if: always() | ||
id: 'compare' | ||
run: | | ||
sed -i '/^\(Emailed to:\)/!d' sampleLogs2.log | ||
diff <(sort sampleLogs.log) <(sort sampleLogs2.log) | ||
- name: Run script for Sidekiq | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() && steps.compare.outcome != 'success' | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"SIDEKIQ-COMPATIBILITY: Some tests have failed. Check the action: '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}' "$SLACK_WEBHOOK" | ||
shell: bash | ||
|
||
|
||
celery: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./examples/using-celery | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python and dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies with latest versions | ||
run: pip install -r requirements.txt -U | ||
- name: Run servers and test | ||
id: 'testing' | ||
run: | | ||
flask --app server run > /dev/null 2>&1 & | ||
celery -A tasks worker --loglevel=INFO > /dev/null 2>&1 & | ||
timeout 45s python3 test.py | ||
shell: bash | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Run script | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() && steps.testing.outcome != 'success' | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"CELERY-COMPATIBILITY: Some tests have failed. Check the action: '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}' "$SLACK_WEBHOOK" | ||
shell: bash | ||
|
||
huey: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./examples/using-huey | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python and dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies with latest versions | ||
run: pip install -r requirements.txt -U | ||
- name: Run Huey Worker | ||
run: | | ||
huey_consumer.py tasks.huey > /dev/null 2>&1 & | ||
shell: bash | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Run Python script | ||
id: 'testing' | ||
run: | | ||
python3 test.py | ||
shell: bash | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
|
||
- name: Run script | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() && steps.testing.outcome != 'success' | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"HUEY-COMPATIBILITY: Some tests have failed. Check the action: '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}' "$SLACK_WEBHOOK" | ||
shell: bash | ||
|
||
apscheduler: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./examples/using-apscheduler | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python and dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies with latest versions | ||
run: pip install -r requirements.txt -U | ||
- name: Run compatibility test | ||
id: "testing" | ||
run: | | ||
python3 test.py | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Run script | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() && steps.testing.outcome != 'success' | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"APSCHEDULER-COMPATIBILITY: Some tests have failed. Check the action: '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}' "$SLACK_WEBHOOK" | ||
shell: bash | ||
|
||
resque: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./examples/using-resque | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Ruby and dependencies | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1' | ||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle install | ||
shell: bash | ||
- name: Populate Queues | ||
continue-on-error: true | ||
run: | | ||
timeout 20s rake resque:work QUEUE=enterprise,free INTERVAL=0.5 2>&1 | tee sampleLogs2.log | ruby populate.rb | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Start Workers | ||
id: 'compare' | ||
run: | | ||
sed -i '/^\(Enterprise process\|Free process\)/!d' sampleLogs2.log | ||
diff sampleLogs.log sampleLogs2.log | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Run script for Resque | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() && steps.compare.outcome != 'success' | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"RESQUE-COMPATIBILITY: Some tests have failed. Check the action: '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}' "$SLACK_WEBHOOK" | ||
shell: bash | ||
|
||
|
||
redis-rs: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./examples/using_redis-rs | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Cargo run | ||
id: 'testing' | ||
run: | | ||
cargo run | ||
env: | ||
UPSTASH_REDIS_HOST: ${{ secrets.UPSTASH_REDIS_HOST }} | ||
UPSTASH_REDIS_PASSWORD: ${{ secrets.UPSTASH_REDIS_PASSWORD }} | ||
UPSTASH_REDIS_PORT: ${{ secrets.UPSTASH_REDIS_PORT }} | ||
- name: Run script | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() && steps.testing.outcome != 'success' | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"RUST-REDIS-COMPATIBILITY: Some tests have failed. Check the action: '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}' "$SLACK_WEBHOOK" | ||
shell: bash | ||
|
||
|
36099ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
upstash-examples-contentlayer – ./api
examples-content.vercel.app
upstash-examples-contentlayer-upstash.vercel.app
upstash-examples-contentlayer-git-main-upstash.vercel.app
upstash-examples-content.vercel.app
36099ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
examples-next-auth-upstash-redis – ./examples/nextauth-upstash-redis
examples-next-auth-upstash-redis-upstash.vercel.app
examples-next-auth-upstash-redis-git-main-upstash.vercel.app
examples-weld.vercel.app
upstash-redis-with-nextauth.vercel.app
36099ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
feedback-form-ratelimit-resend – ./examples/nextjs-feedback-form-ratelimit-resend
feedback-form-ratelimit-resend.vercel.app
feedback-form-ratelimit-resend-upstash.vercel.app
feedback-form-ratelimit-resend-git-main-upstash.vercel.app
36099ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
examples – ./examples/nextjs-upstash-query
examples-wheat.vercel.app
examples-git-main-upstash.vercel.app
query.upstash.app
examples-upstash.vercel.app