Test Library CI (dev) #6
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
name: "Test CI Dev" | |
on: | |
# Schedule the workflow to run every day at 19:00 UTC | |
schedule: | |
- cron: "00 19 * * *" | |
# Add a manual trigger option for running the workflow | |
workflow_dispatch: | |
jobs: | |
nightly-test: | |
permissions: | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Debug | |
run: git status | |
- name: Install dependencies | |
run: | | |
set -e | |
python -m pip install --extra-index-url https://pypi.org/simple --pre -U -r requirements.txt | |
python -m pip install --extra-index-url https://pypi.org/simple -U -r requirements_tests.txt | |
# Set environment variables for the dev environment | |
- name: Set environment for nightly dev run | |
run: | | |
set -ex | |
echo "Running on dev environment." | |
echo "M2M_SECRET_ARN=${{ secrets.NIGHTLY_M2M_SECRET_ARN }}" >> $GITHUB_ENV | |
echo "CLASSIQ_IDE=https://nightly.platform.classiq.io" >> $GITHUB_ENV | |
echo "CLASSIQ_HOST=https://staging.api.classiq.io" >> $GITHUB_ENV | |
echo "IS_DEV=true" >> $GITHUB_ENV | |
shell: bash | |
# Configure AWS credentials | |
- name: Configure AWS Credentials | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE }} | |
aws-region: us-east-1 | |
mask-aws-account-id: true | |
# Set authentication with M2M token | |
- name: Set authentication | |
run: .github/scripts/get_m2m_token.sh | |
shell: bash | |
env: | |
IS_DEV: "${{ env.IS_DEV }}" | |
M2M_SECRET_ARN: "${{ env.M2M_SECRET_ARN }}" | |
# Run Notebook Tests | |
- name: Run Notebooks | |
run: python -m pytest --log-cli-level=INFO tests | |
env: | |
JUPYTER_PLATFORM_DIRS: "1" | |
SHOULD_TEST_ALL_FILES: "true" # Assuming this is always set to 'true' in the workflow | |
LIST_OF_IPYNB_CHANGED: "**/*.ipynb" # Set to match all notebook files | |
CLASSIQ_IDE: "${{ env.CLASSIQ_IDE }}" | |
CLASSIQ_HOST: "${{ env.CLASSIQ_HOST }}" | |
shell: bash |