Skip to content

Bump actions/download-artifact from 3 to 4 #15

Bump actions/download-artifact from 3 to 4

Bump actions/download-artifact from 3 to 4 #15

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
build_sdist:
name: Build and test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10", 3.11, 3.12, 3.13]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |-
python -m pip install --upgrade pip
python -m pip install setuptools>=0.8 wheel build
- name: Build sdist
shell: bash
run: |-
python -m build --sdist --outdir wheelhouse
- name: Install sdist
run: |-
ls -al ./wheelhouse
pip install pytest pytest-cov
pip install Cython
pip install wheelhouse/*.tar.gz -v
- name: Test sdist
run: |-
pwd
ls -al
# Run in a sandboxed directory
WORKSPACE_DNAME="testsrcdir_minimal_${{ matrix.python-version }}_${GITHUB_RUN_ID}_${RUNNER_OS}"
mkdir -p $WORKSPACE_DNAME
cd $WORKSPACE_DNAME
# Get path to installed package
MOD_NAME=lark_cython
MOD_DPATH=$(python -c "import $MOD_NAME, os; print(os.path.dirname($MOD_NAME.__file__))")
echo "MOD_DPATH = $MOD_DPATH"
# Run the tests
python -m pytest --cov=$MOD_NAME $MOD_DPATH ../tests
cd ..