@@ -21,24 +21,18 @@ jobs:
2121 runs-on : ubuntu-latest
2222
2323 steps :
24+ #
25+ # Setup Repository
26+ #
2427 - name : Checkout repository
2528 uses : actions/checkout@v4
2629
27- - name : Set up Python
28- uses : actions/setup-python@v5
29- with :
30- python-version : " 3.11"
31-
3230 - name : Debug
3331 run : git status
3432
35- - name : Install dependencies
36- run : |
37- set -e
38- python -m pip install -U pip
39- python -m pip install --extra-index-url https://pypi.org/simple --pre -U -r requirements.txt
40- python -m pip install --extra-index-url https://pypi.org/simple -U -r requirements_tests.txt
41-
33+ #
34+ # Setup Environment
35+ #
4236 # Configure AWS credentials
4337 - name : Configure AWS Credentials
4438 uses : aws-actions/configure-aws-credentials@v4.0.2
5448 IS_DEV : " true"
5549 M2M_SECRET_ARN : " ${{ secrets.NIGHTLY_M2M_SECRET_ARN }}"
5650
51+ #
52+ # Setup Python
53+ # (needs to run after "Setup Environment", since we install classiq's version from aws)
54+ #
55+ - name : Set up Python
56+ uses : actions/setup-python@v5
57+ with :
58+ python-version : " 3.11"
59+
60+ - name : Install dependencies
61+ run : |
62+ # Some weird behavior, that we should understand soon:
63+ # "pip" defaults to use the aws url, and doesn't use the normal url
64+ # so we need to add the normal pip url to every line..
65+ set -e
66+
67+ python -m pip install -U pip \
68+ --extra-index-url https://pypi.org/simple
69+
70+ # Install "classiq" separately
71+ export CODEARTIFACT_AUTH_TOKEN="$( \
72+ aws codeartifact get-authorization-token \
73+ --domain ${{ secrets.CODEARTIFACT_DOMAIN }} \
74+ --domain-owner ${{ secrets.CODEARTIFACT_OWNER }} \
75+ --region ${{ secrets.CODEARTIFACT_REGION }} \
76+ --query authorizationToken \
77+ --output text \
78+ )"
79+ python -m pip install -U --pre \
80+ --extra-index-url "https://aws:$CODEARTIFACT_AUTH_TOKEN@${{ secrets.CODEARTIFACT_DOMAIN }}-${{ secrets.CODEARTIFACT_OWNER }}.d.codeartifact.${{ secrets.CODEARTIFACT_REGION }}.amazonaws.com/pypi/${{ secrets.PYPI_NIGHTLY_NAME }}/simple/" \
81+ --extra-index-url https://pypi.org/simple \
82+ classiq
83+
84+ # Install everything from the requirements, other than "classiq".
85+ python -m pip install -U $(grep -ivE "classiq" requirements.txt) \
86+ --extra-index-url https://pypi.org/simple
87+ python -m pip install -U -r requirements_tests.txt \
88+ --extra-index-url https://pypi.org/simple
89+
5790 # Run Notebook Tests
5891 - name : Run Notebooks
5992 run : python -m pytest --log-cli-level=INFO tests
0 commit comments