-
Notifications
You must be signed in to change notification settings - Fork 852
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
0c4dc44
commit f073698
Showing
69 changed files
with
477 additions
and
1,627 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,23 +1,20 @@ | ||
name: "Test notebooks old" | ||
name: "Test notebooks" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
on: [pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: "Install dependencies" | ||
run: | | ||
python -m pip install -U -r requirements.txt | ||
python -m pip install -U -r requirements_tests.txt | ||
- name: Get changed files - all | ||
id: changed-files-all | ||
|
@@ -29,51 +26,26 @@ jobs: | |
files: | | ||
**.ipynb | ||
- uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE }} | ||
aws-region: us-east-1 | ||
mask-aws-account-id: true | ||
|
||
- name: Set environment variables | ||
run: | | ||
set -ex | ||
echo "CLASSIQ_TEXT_ONLY=true" >> $GITHUB_ENV | ||
if [ "${{ github.event_name }}" == 'pull_request' ]; then | ||
echo "SHOULD_TEST_ALL_FILES=false" >> $GITHUB_ENV | ||
echo "HAS_ANY_FILE_CHANGED=${{ steps.changed-files-all.outputs.any_changed }}" >> $GITHUB_ENV | ||
echo "LIST_OF_FILE_CHANGED=${{ steps.changed-files-all.outputs.all_changed_files }}" >> $GITHUB_ENV | ||
echo "HAS_ANY_IPYNB_CHANGED=${{ steps.changed-files-ipynb.outputs.any_changed }}" >> $GITHUB_ENV | ||
echo "LIST_OF_IPYNB_CHANGED=${{ steps.changed-files-ipynb.outputs.all_changed_files }}" >> $GITHUB_ENV | ||
elif [[ "${{ github.event_name }}" == 'workflow_dispatch' || "${{ github.head_ref || github.ref_name }}" == "dev" ]]; then | ||
elif [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then | ||
echo "SHOULD_TEST_ALL_FILES=true" >> $GITHUB_ENV | ||
echo "HAS_ANY_FILE_CHANGED=None" >> $GITHUB_ENV | ||
echo "LIST_OF_FILE_CHANGED=None" >> $GITHUB_ENV | ||
echo "HAS_ANY_IPYNB_CHANGED=None" >> $GITHUB_ENV | ||
echo "LIST_OF_IPYNB_CHANGED=None" >> $GITHUB_ENV | ||
fi | ||
if [ "${{ github.head_ref || github.ref_name }}" == "dev" ]; then | ||
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 | ||
fi | ||
- name: Set authentication | ||
run: .github/scripts/get_m2m_token.sh | ||
env: | ||
PROD_M2M_SECRET_ARN: "${{ secrets.PROD_M2M_SECRET_ARN }}" | ||
NIGHTLY_M2M_SECRET_ARN: "${{ secrets.NIGHTLY_M2M_SECRET_ARN }}" | ||
|
||
- name: Install dependencies | ||
run: | | ||
set -e | ||
# Pre is needed for Dev pre releases | ||
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: echo "${{ secrets.CLASSIQ_CREDENTIALS_B64 }}" | base64 --decode > "${HOME}/.classiq-credentials" | ||
|
||
- name: "Run tests" | ||
run: python -m pytest --log-cli-level=INFO tests | ||
run: python -m pytest tests | ||
env: | ||
JUPYTER_PLATFORM_DIRS: "1" |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.