diff --git a/.github/workflows/test_coverage_with_tokens.yml b/.github/workflows/test_coverage_with_tokens.yml index 6d84334f..39a674a5 100644 --- a/.github/workflows/test_coverage_with_tokens.yml +++ b/.github/workflows/test_coverage_with_tokens.yml @@ -44,8 +44,8 @@ jobs: run: | OUTPUT=$(aws cognito-idp "${{ secrets.COGNITO_INIT }}" --user-pool-id "${{ secrets.COGNITO_USER_POOL_ID }}" --client-id "${{ secrets.COGNITO_CLIENT_ID }}" --auth-flow "${{ secrets.COGNITO_AUTH_FLOW }}" --auth-parameters USERNAME="${{ secrets.COGNITO_USERNAME }}",PASSWORD=${{ secrets.COGNITO_PASSWORD }}) - ACCESS_TOKEN=$(echo "$OUTPUT" | jq -r '.AuthenticationResult.AccessToken' | sed 's/^"\(.*\)"$/\1/') - ID_TOKEN=$(echo "$OUTPUT" | jq -r '.AuthenticationResult.IdToken' | sed 's/^"\(.*\)"$/\1/') + echo ACCESS_TOKEN=$(echo "$OUTPUT" | jq -r '.AuthenticationResult.AccessToken' | sed 's/^"\(.*\)"$/\1/') >> "$GITHUB_OUTPUT" + echo ID_TOKEN=$(echo "$OUTPUT" | jq -r '.AuthenticationResult.IdToken' | sed 's/^"\(.*\)"$/\1/') >> "$GITHUB_OUTPUT" - name: Setup Python uses: actions/setup-python@v4 @@ -54,8 +54,6 @@ jobs: - name: Install CRIPT Python SDK run: | - pwd - ls -la pip install -e . - name: Install requirements_dev.txt @@ -64,6 +62,8 @@ jobs: - name: Test Coverage run: pytest tests/api/test_api.py env: + ACCESS_TOKEN: ${{ steps.cognito-token.outputs.ACCESS_TOKEN }} + ID_TOKEN: ${{ steps.cognito-token.outputs.ID_TOKEN }} CRIPT_HOST: https://lb-stage.mycriptapp.org/ CRIPT_TOKEN: $ID_TOKEN CRIPT_STORAGE_TOKEN: $ACCESS_TOKEN