Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI test #6

Merged
merged 36 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c12e11c
Update python-app.yml
alperaltuntas Mar 27, 2024
c020bc0
Update python-app.yml
alperaltuntas Mar 27, 2024
ae6a4a1
Update python-app.yml
alperaltuntas Mar 27, 2024
0436da3
Update python-app.yml
alperaltuntas Mar 27, 2024
fb6423e
Update python-app.yml
alperaltuntas Mar 27, 2024
1c6ce4c
Update python-app.yml
alperaltuntas Mar 27, 2024
652185a
Update python-app.yml
alperaltuntas Mar 27, 2024
bc51b9d
Update python-app.yml
alperaltuntas Mar 27, 2024
cb29e81
Update environment.yml
alperaltuntas Mar 27, 2024
6adafd6
Update environment.yml
alperaltuntas Mar 27, 2024
6b0f67a
Update environment.yml
alperaltuntas Mar 27, 2024
229750f
Update python-app.yml
alperaltuntas Mar 27, 2024
8c7dcb2
Update python-app.yml
alperaltuntas Mar 27, 2024
56f9598
Update python-app.yml
alperaltuntas Mar 27, 2024
3cca51a
Update python-app.yml
alperaltuntas Mar 27, 2024
2ce0573
Update python-app.yml
alperaltuntas Mar 27, 2024
fe21855
Update python-app.yml
alperaltuntas Mar 27, 2024
8941957
Update python-app.yml
alperaltuntas Mar 27, 2024
8fffcef
Update python-app.yml
alperaltuntas Mar 27, 2024
22f152d
Update python-app.yml
alperaltuntas Mar 27, 2024
83f84a1
Update python-app.yml
alperaltuntas Mar 27, 2024
3ee8339
Update python-app.yml
alperaltuntas Mar 27, 2024
5ee1e49
Update python-app.yml
alperaltuntas Mar 27, 2024
9702575
Update python-app.yml
alperaltuntas Mar 27, 2024
d3a6bc9
Update python-app.yml
alperaltuntas Mar 27, 2024
52988ce
Update python-app.yml
alperaltuntas Mar 27, 2024
09cd7f0
Update python-app.yml
alperaltuntas Mar 27, 2024
c4f422f
update workflows
alperaltuntas Mar 27, 2024
4f881ef
update workflows
alperaltuntas Mar 27, 2024
d1fc1e2
update workflows
alperaltuntas Mar 27, 2024
d7a94c5
update workflows
alperaltuntas Mar 27, 2024
ba18927
update workflows
alperaltuntas Mar 27, 2024
bb4b04e
update workflows
alperaltuntas Mar 27, 2024
dc0c284
create CIME_OUTPUT_ROOT if it doesn't exist
alperaltuntas Mar 27, 2024
a5b7c48
update ci
alperaltuntas Mar 27, 2024
d6ab064
update ci
alperaltuntas Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow will install CESM, create visualCaseGen conda env, and run all CI tests.

name: visualCaseGen CI

on:
push:
branches: [ "main", "ci" ]
pull_request:
branches: [ "main", "ci" ]

jobs:
ci_tests:
name: visualCaseGen CI tests
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -el {0}
steps:

- name: Install xmllint
run: sudo apt-get install -y libxml2-utils

# clone CESM
- uses: actions/checkout@v4
with:
repository: alperaltuntas/CESM
ref: cesm2_3_alpha17b_gui
#submodules: recursive

# Run manage_Externals
- name: checkout CESM
run: |
./manage_externals/checkout_externals -o

# set up conda
- uses: conda-incubator/setup-miniconda@v3

# visualCaseGen conda env
- name: Create visualCaseGen conda env
run: |
cd visualCaseGen/
conda env create --file environment.yml
conda activate visualCaseGen

# Run all tests
- name: Run tests
env:
CIME_MODEL: "cesm"
CIME_DRIVER: "nuopc"
CIME_TEST_PLATFORM: ubuntu-latest
run: |
export SRC_PATH="${GITHUB_WORKSPACE}"
mkdir -p /home/runner/cesm/scratch
cd visualCaseGen/
conda activate visualCaseGen
pytest tests

45 changes: 0 additions & 45 deletions .github/workflows/python-app.yml

This file was deleted.

8 changes: 5 additions & 3 deletions visualCaseGen/cime_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,11 @@ def _retrieve_machines(self):
f"Couldn't determine CIME_OUTPUT_ROOT for {self.machine}"
)
if not os.path.exists(self.cime_output_root):
logger.error(
f"CIME_OUTPUT_ROOT doesn't exist: {self.cime_output_root}"
logger.warning(
f"CIME_OUTPUT_ROOT doesn't exist. Creating it at {self.cime_output_root}"
)
# recursively create the directory
os.makedirs(self.cime_output_root)

# Determine DIN_LOC_ROOT
din_loc_root_node = machines_obj.get_child(
Expand All @@ -542,7 +544,7 @@ def _retrieve_machines(self):
logger.error(f"DIN_LOC_ROOT doesn't exist: {self.din_loc_root}")

break

# Keep a record of whether a project id is required for each machine
for machine in self.machines:
machines_obj = Machines(machs_file, machine=machine)
Expand Down