New script for dissolved catchments. #59
Workflow file for this run
This file contains 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
#******************************************************************************* | |
#github_actions_CI.yml | |
#******************************************************************************* | |
#Purpose: | |
#GitHub Actions is a continuous integration and continuous delivery (CI/CD) | |
#platform that allows to automate the build, test, and deployment pipeline. The | |
#The purpose of this file is to give instructions to GitHub on how to do the | |
#integration work. | |
#Authors: | |
#Jay Siri, Cedric H. David, 2022-2023. | |
#******************************************************************************* | |
#Name and specification of triggers | |
#******************************************************************************* | |
name: GitHub Actions CI | |
on: | |
push: | |
pull_request: | |
#******************************************************************************* | |
#Jobs | |
#******************************************************************************* | |
jobs: | |
#---------------------------------------------------------------------------- | |
#Ubuntu | |
#---------------------------------------------------------------------------- | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- dwnl: ./tst_pub_dwnl_Emery_etal_2020_JHM2.sh | |
repr: ./tst_pub_repr_Emery_etal_2020_JHM2.sh | |
steps: | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#Checkout RAPID code | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
- name: Checkout RRR code | |
uses: actions/checkout@v3 | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#Display GitHub Action-related information | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
- name: Display GitHub Action-related information | |
run: | | |
echo "This job was triggered by a ${{ github.event_name }} event." | |
echo "This job is running on a ${{ runner.os }} server at GitHub!" | |
echo "The name of the repository is ${{ github.repository }}." | |
echo "The name of the branch is ${{ github.ref }}." | |
echo "The current working directory is $PWD" | |
echo "The GitHub workspace is ${{ github.workspace }}" | |
echo "The shell used is $SHELL" | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#Install OS requirements | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
- name: Install OS requirements | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends $(grep -v -E '(^#|^$)' requirements.apt) | |
sudo rm -f /usr/bin/python3 | |
sudo ln -s /usr/bin/python3.9 /usr/bin/python3 | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#Install Python requirements | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
- name: Install Python requirements | |
run: | | |
wget https://bootstrap.pypa.io/pip/get-pip.py | |
sudo python3 get-pip.py --no-cache-dir `grep 'pip==' requirements.pip` `grep 'setuptools==' requirements.pip` `grep 'wheel==' requirements.pip` | |
rm get-pip.py | |
which pip3 | |
pip3 --version | |
sudo pip3 install --no-cache-dir -r requirements.pip | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#Run tests | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
- name: Run tests | |
env: | |
TST_PUB_DWNL: ${{matrix.dwnl}} | |
TST_PUB_REPR: ${{matrix.repr}} | |
run: | | |
cd $GITHUB_WORKSPACE | |
cd ./tst | |
echo $TST_PUB_DWNL && $TST_PUB_DWNL | |
echo $TST_PUB_REPR && $TST_PUB_REPR | |
#******************************************************************************* | |
#End | |
#******************************************************************************* |