Skip to content

feat(RPS-976): added integration test CI #57

feat(RPS-976): added integration test CI

feat(RPS-976): added integration test CI #57

name: Integration Test
on:
pull_request:
branches:
- main
jobs:
integration-test:
runs-on: ubuntu-latest
env:
API_VERSION: "v1"
API_URL: ""
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Create NOVA instance and check connection
env:
PORTAL_STG_REFRESH_URL: ${{ secrets.PORTAL_STG_REFRESH_URL }}
PORTAL_STG_REFRESH_CLIENT_ID: ${{ secrets.PORTAL_STG_REFRESH_CLIENT_ID }}
PORTAL_STG_REFRESH_TOKEN: ${{ secrets.PORTAL_STG_REFRESH_TOKEN }}
API_VERSION: "v1"
# Optional
PROJECT_VERSION: "1.0.0"
GITHUB_RUN_ID: ${{ github.run_id }}
INSECURE_CURL: "true" # If you need to skip SSL verification
run: |
source ./scripts/create_nova_instance.sh
echo $PORTAL_STG_HOST
echo "PORTAL_STG_HOST=$PORTAL_STG_HOST" >> $GITHUB_ENV
echo "PORTAL_STG_INSTANCE_ID=$PORTAL_STG_INSTANCE_ID" >> $GITHUB_ENV
echo "PORTAL_STG_ACCESS_TOKEN=$PORTAL_STG_ACCESS_TOKEN" >> $GITHUB_ENV
- name: Set up Python environment
run: |
pip install poetry
poetry install
- name: Test examples
run: |
echo "Running test examples"
touch ./.env
echo "NOVA_API=https://${{ env.PORTAL_STG_HOST }}" >> ./.env
echo "NOVA_ACCESS_TOKEN=${{ env.PORTAL_STG_ACCESS_TOKEN }}" >> ./.env
echo "CELL_NAME=cell" >> ./.env
source ./scripts/run_examples.sh
# Always run cleanup, whether success or failure
- name: Cleanup - Delete instance
if: always()
run: |
./scripts/delete_nova_instance.sh
env:
PORTAL_STG_INSTANCE_ID: ${{ env.PORTAL_STG_INSTANCE_ID }}
PORTAL_STG_ACCESS_TOKEN: ${{ env.PORTAL_STG_ACCESS_TOKEN }}