Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full secrets #446

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,20 @@ 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: Checkout
uses: actions/checkout@v4
- 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: |
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/')

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -59,3 +64,8 @@ jobs:

- name: Run pytest on tests/
run: python${{ matrix.python-version }} -m pytest ./tests/
env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
CRIPT_TOKEN: $ID_TOKEN
CRIPT_STORAGE_TOKEN: $ACCESS_TOKEN
CRIPT_TESTS: True
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CRIPT DEVELOPMENT TEAM

- [Navid Hariri](https://github.com/nh916)
- [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)
Loading