Skip to content

TGTG API Test

TGTG API Test #714

Workflow file for this run

name: TGTG API Test
on:
schedule:
- cron: 0 1 * * *
env:
PYTHON_VERSION: '3.11'
POETRY_VERSION: 1.8.2
jobs:
test:
name: Run Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
without: build
- name: Run tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 10
retry_wait_seconds: 1800
command: |
poetry run pytest -v -m tgtg_api
echo "::add-mask::${{ env.TGTG_ACCESS_TOKEN }}"
echo "::add-mask::${{ env.TGTG_REFRESH_TOKEN }}"
echo "::add-mask::${{ env.TGTG_USER_ID }}"
echo "::add-mask::${{ env.TGTG_COOKIE }}"
echo "TGTG_ACCESS_TOKEN=${{ env.TGTG_ACCESS_TOKEN }}" >> $GITHUB_ENV
echo "TGTG_REFRESH_TOKEN=${{ env.TGTG_REFRESH_TOKEN }}" >> $GITHUB_ENV
echo "TGTG_USER_ID=${{ env.TGTG_USER_ID }}" >> $GITHUB_ENV
echo "TGTG_COOKIE=${{ env.TGTG_COOKIE }}" >> $GITHUB_ENV
env:
TGTG_USERNAME: ${{ secrets.TGTG_USERNAME }}
TGTG_ACCESS_TOKEN: ${{ secrets.TGTG_ACCESS_TOKEN }}
TGTG_REFRESH_TOKEN: ${{ secrets.TGTG_REFRESH_TOKEN }}
TGTG_USER_ID: ${{ secrets.TGTG_USER_ID }}
TGTG_COOKIE: ${{ secrets.TGTG_COOKIE }}
- uses: Der-Henning/[email protected]
with:
name: TGTG_ACCESS_TOKEN
value: ${{ env.TGTG_ACCESS_TOKEN }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: Der-Henning/[email protected]
with:
name: TGTG_REFRESH_TOKEN
value: ${{ env.TGTG_REFRESH_TOKEN }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: Der-Henning/[email protected]
with:
name: TGTG_USER_ID
value: ${{ env.TGTG_USER_ID }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: Der-Henning/[email protected]
with:
name: TGTG_COOKIE
value: ${{ env.TGTG_COOKIE }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}