Skip to content

Commit

Permalink
Let's go
Browse files Browse the repository at this point in the history
  • Loading branch information
InnocentBug committed Mar 25, 2024
1 parent 09cc0f5 commit 57f075b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ jobs:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.12]

env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
CRIPT_TOKEN: 123456789
CRIPT_STORAGE_TOKEN: 987654321
CRIPT_TESTS: False

steps:
- name: Generate Cognito token
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
run: |
pip install awscli
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 }})
export ACCESS_TOKEN=$(echo "$OUTPUT" | jq -r '.AuthenticationResult.AccessToken' | sed 's/^"\(.*\)"$/\1/')
export ID_TOKEN=$(echo "$OUTPUT" | jq -r '.AuthenticationResult.IdToken' | sed 's/^"\(.*\)"$/\1/')
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -59,3 +63,9 @@ jobs:

- name: Run pytest on tests/
run: python${{ matrix.python-version }} -m pytest ./tests/

env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
CRIPT_TOKEN: ${{ steps.cognito.outputs.ID_TOKEN }}
CRIPT_STORAGE_TOKEN: ${{ steps.cognito.outputs.ACCESS_TOKEN }}
CRIPT_TESTS: True
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CRIPT DEVELOPMENT TEAM

- [Ludwig Schneider](https://github.com/InnocentBug/)
- [Dylan Walsh](https://github.com/dylanwal/)
- [Brillant Kasami](https://github.com/brili)
- [Fatjon Ismailaj](https://github.com/fatjon95)
- [Izaim Osmani](https://github.com/izaim)
- [Izaim Osmani](https://github.com/izaim)

0 comments on commit 57f075b

Please sign in to comment.