diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..66f41ce --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + + - name: Set up Julia + uses: julia-actions/setup-julia@v2 + with: + version: "1.10" # Explicitly use the stable LTS + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install dependencies + run: pip install . pytest + + - name: Initialize Julia via Python + run: python -c "import juliacall" + env: + # This tells juliapkg: "Don't download Julia, use the one I just installed" + PYTHON_JULIAPKG_EXE: julia + + - name: Run tests + run: pytest tests/ + env: + PYTHON_JULIAPKG_EXE: julia + PYTHON_JULIAPKG_OFFLINE: "yes"