Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
auth test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
floxay committed Sep 1, 2024
1 parent 15b675e commit 126d948
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test-auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Auth

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
auth:
runs-on: ubuntu-latest
timeout-minutes: 5

env:
RIOT_USERNAME: ${{ secrets.RIOT_USERNAME }}
RIOT_PASSWORD: ${{ secrets.RIOT_PASSWORD }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- run: |
python -m pip install --upgrade pip
pip install git+https://github.com/floxay/python-riot-auth.git
- run: python ./.github/workflows/test-auth/script.py
14 changes: 14 additions & 0 deletions .github/workflows/test-auth/script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import asyncio
import os

import riot_auth


USERNAME = os.getenv("RIOT_USERNAME")
assert USERNAME
PASSWORD = os.getenv("RIOT_PASSWORD")
assert PASSWORD

auth = riot_auth.RiotAuth()
asyncio.run(auth.authorize(username=USERNAME, password=PASSWORD))
assert auth.user_id

0 comments on commit 126d948

Please sign in to comment.