-
Notifications
You must be signed in to change notification settings - Fork 855
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bf40a5
commit 7f11333
Showing
1 changed file
with
13 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ on: | |
# Add a manual trigger option for running the workflow | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
nightly-test: | ||
permissions: | ||
|
@@ -31,20 +35,10 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
set -e | ||
python -m pip install -U pip | ||
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] | ||
|
@@ -56,18 +50,18 @@ jobs: | |
# 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 }}" | ||
IS_DEV: "true" | ||
M2M_SECRET_ARN: "${{ secrets.NIGHTLY_M2M_SECRET_ARN }}" | ||
|
||
# Run Notebook Tests | ||
- name: Run Notebooks | ||
run: python -m pytest --log-cli-level=INFO tests | ||
env: | ||
# to disable a warning in Jupyter notebooks | ||
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 | ||
# Passing which notebooks changed | ||
SHOULD_TEST_ALL_FILES: "true" | ||
# Passing environment information | ||
CLASSIQ_IDE: "https://nightly.platform.classiq.io" | ||
CLASSIQ_HOST: "https://staging.api.classiq.io" |