Skip to content

add inputdata unit test #1

add inputdata unit test

add inputdata unit test #1

name: inputdata
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
jobs:
scream-defaults:
runs-on: ubuntu-latest
outputs:
event_name: ${{ github.event_name }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
show-progress: false
submodules: false
- name: Set up Python 3.11
uses: actions/setup-python@v4.7.0
with:
python-version: "3.11"
- name: Run unit tests
working-directory: components/eamxx/cime_config/
run: |
python -m unittest tests/eamxx_default_files.py -v
notify-scream-defaults:
name: Notify if failure
needs: scream-defaults
if: failure() && needs.scream-defaults.outputs.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Create issue
run: |
if [[ $CLOSE_PREVIOUS == true ]]; then
previous_issue_number=$(gh issue list \
--label "$LABELS" \
--json number \
--jq '.[0].number')
if [[ -n $previous_issue_number ]]; then
gh issue close "$previous_issue_number"
gh issue unpin "$previous_issue_number"
fi
fi
new_issue_url=$(gh issue create \
--title "$TITLE" \
--assignee "$ASSIGNEES" \
--label "$LABELS" \
--body "$BODY")
if [[ $PINNED == true ]]; then
gh issue pin "$new_issue_url"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
TITLE: Inputdata server file missing
ASSIGNEES: mahf708,bartgol
LABELS: bug
BODY: |
[Workflow](${{ github.sha }}) failed! There's likely a missing file specified in the configs!
For more information, please see:
- Workflow URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- Workflow SHA: ${{ github.sha }}
PINNED: false
CLOSE_PREVIOUS: false