-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correcting workflow to be independent of the Action
- Loading branch information
Nadav Ben Ami
authored and
Nadav Ben Ami
committed
Nov 7, 2024
1 parent
f34bbd7
commit dd18e6f
Showing
2 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
|
@@ -126,18 +126,29 @@ jobs: | |
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 | ||
# Run notebook tests if any changed notebooks are detected | ||
- name: Run notebook tests | ||
if: steps.changed-files-ipynb.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' | ||
uses: ./.github/actions/run-tests # Calls your composite action | ||
# Configure AWS credentials | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
# diff files - set to python inside pytest | ||
should_test_all_files: ${{ env.SHOULD_TEST_ALL_FILES }} | ||
list_of_ipynb_changed: ${{ steps.changed-files-ipynb.outputs.all_changed_files }} | ||
# aws environment | ||
m2m_secret_arn: ${{ env.M2M_SECRET_ARN }} | ||
aws_role: ${{ secrets.AWS_ROLE }} | ||
is_dev: ${{ env.IS_DEV }} | ||
# environment | ||
classiq_ide: ${{ env.CLASSIQ_IDE }} | ||
classiq_host: ${{ env.CLASSIQ_HOST }} | ||
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 |