add scheduler #1
Workflow file for this run
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
name: Python tests | |
on: | |
push: | |
paths: | |
- python/** | |
- glide-core/src/** | |
- submodules/** | |
- utils/cluster_manager.py | |
- .github/workflows/python.yml | |
- .github/workflows/build-python-wrapper/action.yml | |
- .github/workflows/install-shared-dependencies/action.yml | |
- .github/workflows/test-benchmark/action.yml | |
- .github/workflows/lint-rust/action.yml | |
- .github/workflows/install-valkey/action.yml | |
- .github/workflows/create-test-matrices/action.yml | |
- .github/json_matrices/** | |
pull_request: | |
paths: | |
- python/** | |
- glide-core/src/** | |
- submodules/** | |
- utils/cluster_manager.py | |
- .github/workflows/python.yml | |
- .github/workflows/build-python-wrapper/action.yml | |
- .github/workflows/install-shared-dependencies/action.yml | |
- .github/workflows/test-benchmark/action.yml | |
- .github/workflows/lint-rust/action.yml | |
- .github/workflows/create-test-matrices/action.yml | |
- .github/json_matrices/** | |
workflow_dispatch: | |
inputs: | |
full-matrix: | |
description: "Run the full engine, host, and language version matrix" | |
required: false | |
type: boolean | |
default: "false" | |
schedule: | |
- cron: "0 4 * * *" | |
concurrency: | |
group: python-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
get-matrices: | |
runs-on: ubuntu-latest | |
# Avoid running on schedule for forks | |
if: (github.event_name == 'schedule' && github.repository_owner == 'valkey-io') || github.event_name == 'push' || github.event_name == 'pull_request' | |
outputs: | |
engine-matrix-output: ${{ steps.get-matrices.outputs.engine-matrix-output }} | |
host-matrix-output: ${{ steps.get-matrices.outputs.host-matrix-output }} | |
version-matrix-output: ${{ steps.get-matrices.outputs.version-matrix-output }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: get-matrices | |
uses: ./.github/workflows/create-test-matrices | |
with: | |
language-name: python | |
run-full-matrix: ${{ github.event.inputs.full-matrix || 'false' }} | |
test-python: | |
runs-on: ${{ matrix.host.RUNNER }} | |
needs: get-matrices | |
timeout-minutes: 35 | |
strategy: | |
fail-fast: false | |
matrix: | |
engine: ${{ fromJson(needs.get-matrices.outputs.engine-matrix-output) }} | |
python: ${{ fromJson(needs.get-matrices.outputs.version-matrix-output) }} | |
host: ${{ fromJson(needs.get-matrices.outputs.host-matrix-output) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
test-pubsub-python: | |
runs-on: ${{ matrix.host.RUNNER }} | |
needs: get-matrices | |
timeout-minutes: 35 | |
strategy: | |
fail-fast: false | |
matrix: | |
engine: ${{ fromJson(needs.get-matrices.outputs.engine-matrix-output) }} | |
python: ${{ fromJson(needs.get-matrices.outputs.version-matrix-output) }} | |
host: ${{ fromJson(needs.get-matrices.outputs.host-matrix-output) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
build-amazonlinux-latest: | |
if: github.repository_owner == 'valkey-io' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.event.inputs.full-matrix == 'true' | |
# TODO matrix | |
runs-on: ubuntu-latest | |
container: amazonlinux:latest | |
timeout-minutes: 15 | |
steps: | |
- name: Install git | |
run: | | |
yum -y remove git | |
yum -y remove git-* | |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm | |
yum install -y git | |
git --version | |
- uses: actions/checkout@v4 |