RAI Workflow Manager EA Tests #339
This file contains hidden or 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
name: RAI Workflow Manager EA Tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # Runs every day at midnight UTC | |
jobs: | |
Run-RWM-Tests: | |
runs-on: ubuntu-latest | |
steps: | |
# Install Python | |
- run: echo "Installing Python" | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# Checkout code repo | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Install Python dependencies | |
run: | | |
pip install -r $GITHUB_WORKSPACE/requirements.txt | |
pip install $GITHUB_WORKSPACE | |
# Setup config required for Python CLI run | |
- name: Config setup | |
run: | | |
mkdir ~/.rai | |
cd ~/.rai | |
echo "[default]" > config | |
echo "region = us-east" >> config | |
echo "host = azure-ea.relationalai.com" >> config | |
echo "client_credentials_url = https://login-ea.relationalai.com/oauth/token" >> config | |
echo "port = 443" >> config | |
echo "client_id = ${{ env.RAI_CLIENT_ID }}" >> config | |
echo "client_secret = ${{ env.RAI_CLIENT_SECRET }}" >> config | |
env: | |
RAI_CLIENT_ID: ${{ secrets.EA_CLIENT_ID }} | |
RAI_CLIENT_SECRET: ${{ secrets.EA_CLIENT_SECRET }} | |
# Run e2e Python CLI test | |
- name: Python CLI tests | |
run: | | |
cd $GITHUB_WORKSPACE/cli-e2e-test | |
python -m unittest discover |