Skip to content

Add package name to error messages #1096

Add package name to error messages

Add package name to error messages #1096

Workflow file for this run

name: Testing
on: [pull_request]
jobs:
build:
env:
RELEASE_NAME: release-matrix
REPOSITORY: repository.yml
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.10', '3.11', '3.12']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install csh
- name: Setup Komodo
run: |
pip install -U pip wheel setuptools
pip install ".[dev]"
- name: Unit tests
run: |
pytest tests
pytest --doctest-modules komodo
- name: Lint examples
run: |
komodo-lint examples/stable.yml examples/repository.yml
- name: Transpile file
run: |
komodo-transpiler transpile \
--matrix-file="ci/${{env.RELEASE_NAME}}.yml" \
--output ci --matrix-coordinates "{rhel: ['7'], py: ['${{matrix.python-version}}']}"
- name: Full integration test
run: |
py_version_number=$(echo "${{ matrix.python-version }}" | sed 's/\.//g')
kmd \
ci/${{env.RELEASE_NAME}}-py$py_version_number-rhel7.yml \
ci/${{env.REPOSITORY}} \
--workspace ${{ runner.temp }}/kmd-ws \
--prefix ${{ runner.temp }}/prefix \
--release ci \
- name: Build libkmd.so (a dummy C library) for testing
run: |
set -e
mkdir ${{ runner.temp }}/tmplib
echo 'char* foo() { return "bar"; }' > ${{ runner.temp }}/tmplib/lib.c
cc -shared -o${{ runner.temp }}/tmplib/libkmd.so -fPIC ${{ runner.temp }}/tmplib/lib.c
# Deploy directly into the above built komodo release
cp ${{ runner.temp }}/tmplib/libkmd.so ${{ runner.temp }}/prefix/ci/root/lib
source ${{ runner.temp }}/prefix/ci/enable
which python
python --version
python -c "import numpy;print(numpy.__file__)"
ci/test_import_lib.py
- name: Test enable script
run: |
source ${{ runner.temp }}/prefix/ci/enable
[[ "$(which python)" == "${{ runner.temp }}/prefix/ci/root/bin/python" ]]
- name: Test Python version
run: |
source ${{ runner.temp }}/prefix/ci/enable
pyver=$(python -c 'from sys import version_info as v;print(f"{v[0]}.{v[1]}")')
[[ "${pyver}" == "${{ matrix.python-version }}" ]]