Skip to content

[WIP] Run tests as part of the CI process #89

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

Merged
merged 36 commits into from
Jan 20, 2025
Merged
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4887933
add ci job for UbuntuTestSuite
AdelekeBankole Jan 9, 2025
7a83204
add workflow run
AdelekeBankole Jan 9, 2025
6f5d06c
add steps needed for job
AdelekeBankole Jan 9, 2025
c3cc6c7
add pFUnit to steps required in job
AdelekeBankole Jan 9, 2025
e729a7b
Update .github/workflows/test_suite_ubuntu.yml
AdelekeBankole Jan 13, 2025
3d149eb
Update .github/workflows/test_suite_ubuntu.yml
AdelekeBankole Jan 13, 2025
8841015
Update .github/workflows/test_suite_ubuntu.yml
AdelekeBankole Jan 13, 2025
58098f1
add steps to run test suite
AdelekeBankole Jan 14, 2025
02ba569
Update .github/workflows/test_suite_ubuntu.yml
AdelekeBankole Jan 14, 2025
49f6e5b
add python linter, ruff
AdelekeBankole Jan 14, 2025
9b33b65
add hdf5 in requirements.txt
AdelekeBankole Jan 14, 2025
7e011f1
remove hdf5in requirements.txt
AdelekeBankole Jan 14, 2025
1be238f
add and install hdf5
AdelekeBankole Jan 15, 2025
cf48d06
allow root privileges in getting hdf5
AdelekeBankole Jan 15, 2025
7636480
add and install netcdf lib to dependencies
AdelekeBankole Jan 15, 2025
dfc4958
restrict python version
AdelekeBankole Jan 15, 2025
a6d5ac5
update python run options
AdelekeBankole Jan 15, 2025
3bbf4db
remove pins from dependencies in sounding generation requirements.
jatkinson1000 Jan 15, 2025
e391538
remove ruff from testing suite as covered in the linting checks CI.
jatkinson1000 Jan 15, 2025
ebac2ff
test changing python version.
jatkinson1000 Jan 15, 2025
02902e3
Add SAM sounding file.
jatkinson1000 Jan 15, 2025
1ddcdaf
remove sounding generation from CI workflow as sounding has been uplo…
jatkinson1000 Jan 15, 2025
5053ec8
add netcdf-Fortran to the dependencies installed in the testing CI.
jatkinson1000 Jan 15, 2025
ca2326a
run test from test directory.
jatkinson1000 Jan 15, 2025
ec8a042
Fix ruff errors and pin version to prevent unanticipated issues from …
jatkinson1000 Jan 15, 2025
cee5bd7
Minor tidying of the python CI workflow file.
jatkinson1000 Jan 15, 2025
4b8662b
remove duplicate running of CAM interface test script in test-suite.
jatkinson1000 Jan 16, 2025
0b2ceec
Merge pull request #90 from m2lines/jwa-ci-dependencies-patch
AdelekeBankole Jan 16, 2025
6ce1e13
add exit codes run step
AdelekeBankole Jan 16, 2025
3cc3a8a
add stop 999
AdelekeBankole Jan 17, 2025
ddb302d
try to break code
AdelekeBankole Jan 17, 2025
970b701
remove exit code
AdelekeBankole Jan 17, 2025
11cf9d4
remove the break
AdelekeBankole Jan 17, 2025
50bea02
add YOG convection test in ci
AdelekeBankole Jan 17, 2025
609efb2
remove YOG convection test in ci
AdelekeBankole Jan 17, 2025
04efe1e
Update .github/workflows/test_suite_ubuntu.yml
AdelekeBankole Jan 20, 2025
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
72 changes: 72 additions & 0 deletions .github/workflows/test_suite_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Workflow to run CAM-ML test suite
name: TestSuiteUbuntu

# Controls when the workflow will run
on:
# Triggers the workflow on pushes to the "main" branch, i.e., PR merges
push:
branches: [ "main" ]

# Triggers the workflow on pushes to open pull requests with code changes
pull_request:
paths:
- '.github/workflows/test_suite_ubuntu.yml'
- '**.c'
- '**.cpp'
- '**.fypp'
- '**.f90'
- '**.F90'
- '**.pf'
- '**.py'
- '**.sh'
- '**CMakeLists.txt'
- '**requirements.txt'
- '**data/*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Cancel jobs running if new commits are pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

# Workflow run - one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test-suite-ubuntu"
test-suite-ubuntu:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
std: ["f2008", "f2018"]

# These steps represent sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
with:
persist-credentials: false
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

# MPI is required by pFUnit
- name: Install an MPI distribution
run: |
sudo apt update
sudo apt install mpich

- name: Install pFUnit
run: |
export FC=/usr/bin/gfortran
export MPIF90=/usr/bin/mpif90
git clone -b v4.10.0 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
mkdir pFUnit/build
cd pFUnit/build
cmake ..
make -j 4 install
Loading