-
-
Notifications
You must be signed in to change notification settings - Fork 69
67 lines (64 loc) · 2.27 KB
/
tgtg.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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/actions-set-secret@v2.1.0
with:
name: TGTG_ACCESS_TOKEN
value: ${{ env.TGTG_ACCESS_TOKEN }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: Der-Henning/actions-set-secret@v2.1.0
with:
name: TGTG_REFRESH_TOKEN
value: ${{ env.TGTG_REFRESH_TOKEN }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: Der-Henning/actions-set-secret@v2.1.0
with:
name: TGTG_USER_ID
value: ${{ env.TGTG_USER_ID }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: Der-Henning/actions-set-secret@v2.1.0
with:
name: TGTG_COOKIE
value: ${{ env.TGTG_COOKIE }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}