Skip to content

Changes to aid integration between SDG and Streaming ingestion #585

Changes to aid integration between SDG and Streaming ingestion

Changes to aid integration between SDG and Streaming ingestion #585

Workflow file for this run

name: Run Unit Tests
on: [workflow_dispatch, pull_request]
jobs:
Unit-Tests:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install bz2 development package
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libbz2-dev
- name: Check out repository code
uses: actions/checkout@v2
- name: Clone pyenv
run: git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- name: Run the CI build script
run: bash .ci/build.sh build_and_unit_test
- name: Detect term-check mode from labels
id: detect_mode
shell: bash
run: |
labels='${{ toJson(github.event.pull_request.labels.*.name) }}'
echo "PR labels: $labels"
mode=""
if echo "$labels" | grep -qi '"check-1.x-terms"'; then
mode="block-1x"
elif echo "$labels" | grep -qi '"check-2.x-terms"'; then
mode="block-2x"
fi
echo "mode=$mode" >> "$GITHUB_OUTPUT"
# 2) Run the checker only if a mode was selected
- name: Run term lint checker
if: steps.detect_mode.outputs.mode != ''
env:
OSB_TERM_MODE: ${{ steps.detect_mode.outputs.mode }}
run: |
python3 .ci/scripts/check_deprecated_terms.py --mode "$OSB_TERM_MODE"