Add CWL test (#6) #23
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: Pipeline | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
aiida: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Conda config | |
run: echo -e "channels:\n - conda-forge\n" > .condarc | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: "3.12" | |
miniforge-version: latest | |
condarc-file: .condarc | |
environment-file: environment.yml | |
- name: Test | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge -y aiida-workgraph=0.5.2 | |
verdi presto --profile-name pwd | |
echo -e 'from aiida import load_profile\nload_profile()\n\nfrom python_workflow_definition.aiida import load_workflow_json\n\n\nif __name__ == "__main__":\n workgraph = load_workflow_json(file_name="workflow.json")\n workgraph.run()' > test_with_aiida.py | |
python test_with_aiida.py | |
jobflow: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Conda config | |
run: echo -e "channels:\n - conda-forge\n" > .condarc | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: "3.12" | |
miniforge-version: latest | |
condarc-file: .condarc | |
environment-file: environment.yml | |
- name: Test | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge -y jobflow=0.1.19 | |
echo -e 'from jobflow.managers.local import run_locally\nfrom python_workflow_definition.jobflow import load_workflow_json\n\n\nif __name__ == "__main__":\n flow = load_workflow_json(file_name="workflow.json")\n print(run_locally(flow))' > test_with_jobflow.py | |
python test_with_jobflow.py | |
pyiron: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Conda config | |
run: echo -e "channels:\n - conda-forge\n" > .condarc | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: "3.12" | |
miniforge-version: latest | |
condarc-file: .condarc | |
environment-file: environment.yml | |
- name: Test | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge -y pyiron_base=0.11.11 | |
echo -e 'from python_workflow_definition.pyiron_base import load_workflow_json\n\n\nif __name__ == "__main__":\n delayed_object_lst = load_workflow_json(file_name="workflow.json")\n print(delayed_object_lst[-1].pull())' > test_with_pyiron.py | |
python test_with_pyiron.py | |
cwl: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Conda config | |
run: echo -e "channels:\n - conda-forge\n" > .condarc | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: "3.12" | |
miniforge-version: latest | |
condarc-file: .condarc | |
environment-file: environment.yml | |
- name: Test | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge -y cwltool=3.1.20250110105449 | |
echo -e 'from python_workflow_definition.cwl import write_workflow\n\n\nif __name__ == "__main__":\n write_workflow(file_name="workflow.json")' > test_with_cwl.py | |
python test_with_cwl.py | |
cwltool workflow.cwl workflow.yml |