Skip to content

Test

Test #256

Workflow file for this run

name: Test
on:
workflow_dispatch:
inputs:
os-variant:
default: 'ubuntu-24.04'
type: string
description: 'Operating system'
python-version:
type: string
description: 'Python interpreter version'
command:
type: string
description: 'Test command to run'
checkout-ref:
default: ''
type: string
description: 'Git ref to checkout'
backend-version:
default: ''
type: string
description: 'SciCat backend version, e.g., "v4.8.0"'
workflow_call:
inputs:
os-variant:
default: 'ubuntu-24.04'
type: string
python-version:
type: string
command:
default: 'test'
type: string
checkout-ref:
default: ''
type: string
backend-version:
default: ''
type: string
jobs:
tests:
name: Tests ${{ inputs.os-variant }} ${{ inputs.command }}
runs-on: ${{ inputs.os-variant }}
steps:
- run: sudo apt install --yes docker-compose
if: ${{ contains(inputs.os-variant, 'ubuntu') }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout-ref }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "${{ inputs.python-version }}"
- name: Pin Python version
run: uv python pin ${{ inputs.python-version }}
- name: Install Just
uses: extractions/setup-just@v3
- run: just ${{ inputs.command }}
if: ${{ !inputs.backend-version }}
- run: just ${{ inputs.command }} --scitacean-backend-version=${{ inputs.backend-version }}
if: ${{ inputs.backend-version }}