Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
Signed-off-by: ahmedsobeh <[email protected]>
  • Loading branch information
ahmedsobeh committed Aug 5, 2024
1 parent 72d1de9 commit b5157c9
Showing 1 changed file with 69 additions and 76 deletions.
145 changes: 69 additions & 76 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,86 +25,79 @@ permissions:

jobs:

dependency-audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
with:
inputs: requirements.txt dev_requirements.txt
ignore-vulns: |
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
dependency-audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
with:
inputs: requirements.txt dev_requirements.txt
ignore-vulns: |
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
lint:
name: Code linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
- name: run code linters
run: |
pip install -r dev_requirements.txt
invoke linters
lint:
name: Code linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
- name: run code linters
run: |
pip install -r dev_requirements.txt
invoke linters
run-tests:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 15
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
test-type: ['standalone', 'cluster']
connection-type: ['libvalkey', 'plain']
protocol: ['RESP3', '']
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Python ${{ matrix.python-version }} ${{ matrix.protocol }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: run tests
run: |
pip install -U setuptools wheel
pip install -r requirements.txt
pip install -r dev_requirements.txt
if [ "${{matrix.connection-type}}" == "libvalkey" ]; then
pip install "libvalkey>=4.0.0b1"
fi
invoke devenv
sleep 10 # time to settle
if [[ "${{matrix.protocol}}" == RESP3 ]]; then
invoke ${{matrix.test-type}}-tests --protocol=3
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
invoke ${{matrix.test-type}}-tests --uvloop --protocol=3
fi
else
invoke ${{matrix.test-type}}-tests
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
invoke ${{matrix.test-type}}-tests --uvloop
fi
fi
run-tests:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 15
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
test-type: ['standalone', 'cluster']
connection-type: ['libvalkey', 'plain']
protocol-version: ['2', '3']
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Python ${{ matrix.python-version }} RESP${{ matrix.protocol-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: run tests
run: |
pip install -U setuptools wheel
pip install -r requirements.txt
pip install -r dev_requirements.txt
if [ "${{matrix.connection-type}}" == "libvalkey" ]; then
pip install "libvalkey>=4.0.0b1"
fi
invoke devenv
sleep 10 # time to settle
invoke ${{matrix.test-type}}-tests --protocol=${{ matrix.protocol-version }}
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
invoke ${{matrix.test-type}}-tests --uvloop --protocol=${{ matrix.protocol-version }}
fi
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
path: '${{matrix.test-type}}*results.xml'
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
path: '${{matrix.test-type}}*results.xml'

- name: Upload codecov coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload codecov coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

build_and_test_package:
build_and_test_package:
name: Validate building and installing the package
runs-on: ubuntu-latest
needs: [run-tests]
Expand All @@ -121,7 +114,7 @@ jobs:
run: |
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}
install_package_from_commit:
install_package_from_commit:
name: Install package from commit hash
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit b5157c9

Please sign in to comment.