Skip to content

Commit

Permalink
Merge pull request #26 from upstash/migrate_compatibility_checks
Browse files Browse the repository at this point in the history
migrate tests and dependabot
  • Loading branch information
burak-upstash authored Dec 14, 2023
2 parents 463445b + 6ccb8c6 commit 36099ee
Show file tree
Hide file tree
Showing 2 changed files with 261 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/dependabot.yaml
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"
224 changes: 224 additions & 0 deletions .github/workflows/compatibility-checks.yaml
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


4 comments on commit 36099ee

@vercel
Copy link

@vercel vercel bot commented on 36099ee Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 36099ee Dec 14, 2023

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

@vercel
Copy link

@vercel vercel bot commented on 36099ee Dec 14, 2023

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

@vercel
Copy link

@vercel vercel bot commented on 36099ee Dec 14, 2023

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

Please sign in to comment.