diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..4677434 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Message that will be displayed on users' first issue" + pr-message: "Message that will be displayed on users' first pull request" diff --git a/.github/workflows/python-nose.yml b/.github/workflows/python-nose.yml index f50887f..36d7124 100644 --- a/.github/workflows/python-nose.yml +++ b/.github/workflows/python-nose.yml @@ -1,8 +1,6 @@ name: Unittest -on: - push: - branches: [ "main", "modellevel", "preslevel" ] +on: [push, pull_request_target, issues] jobs: build-linux: diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile new file mode 100644 index 0000000..23d7b08 --- /dev/null +++ b/.jenkins/Jenkinsfile @@ -0,0 +1,29 @@ +pipeline { + agent any + stages { + stage('Install pip') { + steps { + //sh 'wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | gpg --dearmor | sudo tee /usr/share/keyrings/jenkins-archive-keyring.gpg > /dev/null' + sh 'sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5BA31D57EF5975CA' + sh 'apt-get update && apt-get install -y python3-pip' + } + } + stage('Install Requirements') { + steps { + sh 'pip3 install --upgrade pip' // sh means bash + sh 'pip3 install -r requirements.txt' + } + } + stage('version') { + steps { + sh 'python3 --version' + } + } + stage('Run nose2') { + steps { + sh 'export PYTHONPATH=$(pwd) && cd $(pwd)/test && nose2' + } + } + // Add more stages as needed + } +} diff --git a/src/utilitylib.py b/src/utilitylib.py index 529c01c..09b81f0 100644 --- a/src/utilitylib.py +++ b/src/utilitylib.py @@ -25,7 +25,7 @@ def datum(leadtime, start, datetime_obj): # --------------------------------------------------------------------------------------------------------------------- -def load_yaml(yaml_file, yaml_path='./'): +def load_yaml(yaml_file, yaml_path='.'): """ Parameters: -----------