Skip to content

chore(deps): update node.js dependencies #1893

chore(deps): update node.js dependencies

chore(deps): update node.js dependencies #1893

Workflow file for this run

name: Python Tests
on:
push:
branches: [master]
pull_request:
branches: [master, next]
concurrency:
group: python-test-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.filter.outputs.python }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: filter
with:
filters: |
python:
- 'python/**'
- 'src/commands/**'
- 'src/postgres/**'
- 'scripts/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/python-test.yml'
python:
runs-on: ubuntu-latest
needs: changes
name: testing python@${{ matrix.python-version }}, redis@${{ matrix.redis-version }}
env:
should_run: ${{ needs.changes.outputs.should_run }}
strategy:
matrix:
node-version: [lts/*]
redis-version: [7-alpine]
python-version: ['3.13']
steps:
- name: Skip when python inputs are unchanged
if: env.should_run != 'true'
run: echo "No python changes detected; skipping steps."
- name: Checkout repository
if: env.should_run == 'true'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js ${{ matrix.node-version }}
if: env.should_run == 'true'
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Start Redis
if: env.should_run == 'true'
uses: supercharge/redis-github-action@bc274cb7238cd63a45029db04ee48c07a72609fd # 1.8.1
with:
redis-version: ${{ matrix.redis-version }}
- if: env.should_run == 'true'
run: yarn install --ignore-engines --frozen-lockfile --non-interactive
- if: env.should_run == 'true'
run: yarn build
- if: env.should_run == 'true'
run: |
yarn copy:lua:python
yarn copy:sql:python
- name: Set up Python ${{ matrix.python-version }}
if: env.should_run == 'true'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: env.should_run == 'true'
run: |
python -m pip install --upgrade pip
pip install flake8 mypy
pip install -e "python/[dev,test]"
- name: Lint with flake8
if: env.should_run == 'true'
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./python --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./python --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
if: env.should_run == 'true'
run: |
cd python
pytest -v
python-dragonflydb:
runs-on: ubuntu-latest
needs: changes
name: testing python@${{ matrix.python-version }}, dragonflydb@latest
env:
should_run: ${{ needs.changes.outputs.should_run }}
strategy:
matrix:
node-version: [lts/*]
python-version: ['3.13']
services:
dragonflydb:
image: docker.dragonflydb.io/dragonflydb/dragonfly:latest
env:
DFLY_cluster_mode: emulated
DFLY_lock_on_hashtags: true
HEALTHCHECK_PORT: 6379
ports:
- 6379:6379
steps:
- name: Skip when python inputs are unchanged
if: env.should_run != 'true'
run: echo "No python changes detected; skipping steps."
- name: Checkout repository
if: env.should_run == 'true'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js ${{ matrix.node-version }}
if: env.should_run == 'true'
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- if: env.should_run == 'true'
run: yarn install --ignore-engines --frozen-lockfile --non-interactive
- if: env.should_run == 'true'
run: yarn build
- if: env.should_run == 'true'
run: |
yarn copy:lua:python
yarn copy:sql:python
- name: Set up Python ${{ matrix.python-version }}
if: env.should_run == 'true'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: env.should_run == 'true'
run: |
python -m pip install --upgrade pip
pip install flake8 mypy
pip install -e "python/[dev,test]"
- name: Lint with flake8
if: env.should_run == 'true'
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./python --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./python --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
if: env.should_run == 'true'
run: |
cd python
export BULLMQ_TEST_PREFIX="{b}"
pytest -v