Skip to content

make workflows reusable #10

make workflows reusable

make workflows reusable #10

Workflow file for this run

name: Node
on:
push:
paths:
- glide-core/src/**
- submodules/**
- node/**
- utils/cluster_manager.py
- .github/workflows/node.yml
- .github/workflows/build-node-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:
- glide-core/src/**
- submodules/**
- node/**
- utils/cluster_manager.py
- .github/workflows/node.yml
- .github/workflows/build-node-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/**
workflow_dispatch:
inputs:
full-matrix:
description: "Run the full engine, host, and language version matrix"
required: false
type: boolean
default: "false"
workflow_call:
concurrency:
group: node-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
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: node
run-full-matrix: ${{ github.event.inputs.full-matrix || 'false' }}
test-node:
runs-on: ubuntu-latest
needs: [get-matrices]
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
engine: ${{ fromJson(needs.get-matrices.outputs.engine-matrix-output) }}
host: ${{ fromJson(needs.get-matrices.outputs.host-matrix-output) }}
node: ${{ fromJson(needs.get-matrices.outputs.version-matrix-output) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
lint-rust:
timeout-minutes: 15
runs-on: ubuntu-latest
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
build-and-test-linux-musl-on-x86:
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' && github.event.inputs.full-matrix == 'true')
name: Build and test Node wrapper on Linux musl
runs-on: ubuntu-latest
container:
image: node:alpine
options: --user root --privileged
steps:
- name: Install git
run: |
apk update
apk add git
- uses: actions/checkout@v4
with:
submodules: recursive