Skip to content

Add DASL testing harness to CI workflow #227

Add DASL testing harness to CI workflow

Add DASL testing harness to CI workflow #227

Workflow file for this run

name: Unit tests
on: [ pull_request ]
permissions:
contents: read
env:
UV_PYTHON: 3.8 # minimum supported version
DASL_TESTING_REF: "56f7fd74a8eb0955670dab139034e845329dca57"
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Install UV.
uses: astral-sh/setup-uv@v6
- name: Install dependencies.
run: uv sync --group testing
- name: Compile.
run: uv pip install -v -e .
env:
RUST_BACKTRACE: 1
- name: Run Tests.
run: uv run pytest
- name: Checkout dasl-testing.
uses: actions/checkout@v4
with:
repository: hyphacoop/dasl-testing
path: dasl-testing
ref: ${{ env.DASL_TESTING_REF }}
- name: Run DASL Python harness.
working-directory: dasl-testing/harnesses/python
run: |
RESULT_JSON=$(uv run --with cbor2 python main.py libipld)
{
echo "## DASL Results"
echo
echo '```json'
echo "$RESULT_JSON"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"