Skip to content

ci: gate openjd-cli on the OpenJD conformance suite #1

ci: gate openjd-cli on the OpenJD conformance suite

ci: gate openjd-cli on the OpenJD conformance suite #1

Workflow file for this run

name: Conformance
on:
pull_request:
branches: [ mainline, release, 'patch_*' ]
workflow_call:
inputs:
branch:
required: false
type: string
tag:
required: false
type: string
jobs:
conformance:
name: Conformance (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ inputs.tag }}
- uses: actions/setup-python@v7
with:
python-version: '3.12'
# The suite's job fixtures run `command: python`, which does not exist on a
# bare Ubuntu runner -- only `python3` does. A virtualenv provides both names
# plus the `openjd` entry point the runner invokes, so putting its bin
# directory on PATH covers all three.
- name: Create virtualenv
shell: bash
run: |
# Outside the checkout, so it cannot end up in a source distribution.
python -m venv "$RUNNER_TEMP/conformance-venv"
if [ -d "$RUNNER_TEMP/conformance-venv/Scripts" ]; then
echo "$RUNNER_TEMP/conformance-venv/Scripts" >> "$GITHUB_PATH"
else
echo "$RUNNER_TEMP/conformance-venv/bin" >> "$GITHUB_PATH"
fi
- name: Install openjd-cli
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Checkout openjd-specifications
uses: actions/checkout@v7
with:
repository: OpenJobDescription/openjd-specifications
path: openjd-specifications
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
- name: Run conformance tests
shell: bash
working-directory: openjd-specifications/conformance-tests
run: |
openjd --version
uv run run_openjd_cli_tests.py '2023-09/*'