other checks #117
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Julia Tests | |
| on: | |
| push: | |
| branches: | |
| - main # or your default branch | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Julia | |
| uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: 1.11.6 # or another version | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| auto-update-conda: true | |
| channels: conda-forge | |
| activate-environment: sscha | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| julia --project -e 'using Pkg; Pkg.instantiate()' | |
| # Install Python deps *into the already-activated sscha env* | |
| - name: Install Python deps | |
| shell: bash -l {0} | |
| run: | | |
| conda create -n sscha -c conda-forge python=3.10 gfortran libblas lapack \ | |
| openmpi openmpi-mpicc pip numpy scipy spglib=2.2 pkgconfig setuptools=64 | |
| which python | |
| python -V | |
| python -m pip list | |
| pip install ase | |
| pip install --no-build-isolation "cellconstructor==1.4.1" | |
| pip install --no-build-isolation "python-sscha==1.4.1" | |
| # Point PyCall to Conda's Python and rebuild it | |
| - name: Configure PyCall to use Conda Python | |
| shell: bash -l {0} | |
| run: | | |
| julia --project -e ' | |
| using Pkg | |
| ENV["PYTHON"] = Sys.which("python") | |
| Pkg.build("PyCall") | |
| using PyCall | |
| @info "PyCall.python" PyCall.python' | |
| - name: Run tests | |
| run: | | |
| julia --project -e 'using Pkg; Pkg.test()' |