diff --git a/.github/workflows/Test-CI-dev-daily.yml b/.github/workflows/Test-CI-dev-daily.yml index 18c07ed5f..833f0e138 100644 --- a/.github/workflows/Test-CI-dev-daily.yml +++ b/.github/workflows/Test-CI-dev-daily.yml @@ -32,13 +32,6 @@ jobs: - name: Debug run: git status - - 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 - # Configure AWS credentials - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4.0.2 @@ -47,6 +40,30 @@ jobs: aws-region: us-east-1 mask-aws-account-id: true + - name: Install dependencies + run: | + set -e + python -m pip install -U pip \ + --extra-index-url https://pypi.org/simple + # Install "classiq" separately + export CODEARTIFACT_AUTH_TOKEN="$( \ + aws codeartifact get-authorization-token \ + --domain ${{ secrets.CODEARTIFACT_DOMAIN }} \ + --domain-owner ${{ secrets.CODEARTIFACT_OWNER }} \ + --region ${{ secrets.CODEARTIFACT_REGION }} \ + --query authorizationToken \ + --output text \ + )" + python -m pip install -U --pre \ + --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/" \ + --extra-index-url https://pypi.org/simple \ + classiq + # Install everything from the requirements, other than "classiq". + python -m pip install -U $(grep -ivE "classiq" requirements.txt) \ + --extra-index-url https://pypi.org/simple + python -m pip install -U -r requirements_tests.txt \ + --extra-index-url https://pypi.org/simple + # Set authentication with M2M token - name: Set authentication run: .github/scripts/get_m2m_token.sh diff --git a/.github/workflows/Test-CI-dev.yml b/.github/workflows/Test-CI-dev.yml index abb4fd695..aee576ca4 100644 --- a/.github/workflows/Test-CI-dev.yml +++ b/.github/workflows/Test-CI-dev.yml @@ -81,15 +81,6 @@ jobs: with: python-version: "3.11" - - name: Install dependencies - if: steps.cache-pip.outputs.cache-hit != 'true' - run: | - set -e - python -m pip install -U pip - # The `--pre` allows the installation of pre-release versions of packages (needed for Dev) - 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 - # # Setup Environment # @@ -101,6 +92,30 @@ jobs: aws-region: us-east-1 mask-aws-account-id: true + - name: Install dependencies + run: | + set -e + python -m pip install -U pip \ + --extra-index-url https://pypi.org/simple + # Install "classiq" separately + export CODEARTIFACT_AUTH_TOKEN="$( \ + aws codeartifact get-authorization-token \ + --domain ${{ secrets.CODEARTIFACT_DOMAIN }} \ + --domain-owner ${{ secrets.CODEARTIFACT_OWNER }} \ + --region ${{ secrets.CODEARTIFACT_REGION }} \ + --query authorizationToken \ + --output text \ + )" + python -m pip install -U --pre \ + --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/" \ + --extra-index-url https://pypi.org/simple \ + classiq + # Install everything from the requirements, other than "classiq". + python -m pip install -U $(grep -ivE "classiq" requirements.txt) \ + --extra-index-url https://pypi.org/simple + python -m pip install -U -r requirements_tests.txt \ + --extra-index-url https://pypi.org/simple + # Set authentication with M2M token - name: Set authentication run: .github/scripts/get_m2m_token.sh