Skip to content

Commit 244c189

Browse files
committed
use amazon credentials on workflow
1 parent 33649e3 commit 244c189

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/lint-and-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
permissions:
77
pull-requests: read
88

9+
env:
10+
API_KEY: ${{ secrets.API_KEY }}
11+
API_SECRET: ${{ secrets.API_SECRET }}
12+
AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }}
13+
COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }}
14+
915
jobs:
1016
ruff:
1117
runs-on: ubuntu-latest

tests/integration_test.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
from unittest import TestCase, skipUnless
3+
4+
5+
def are_credentials_defined() -> bool:
6+
api_key = os.environ.get("API_KEY")
7+
api_secret = os.environ.get("API_SECRET")
8+
affiliate_tag = os.environ.get("AFFILIATE_TAG")
9+
country_code = os.environ.get("COUNTRY_CODE")
10+
11+
return all([api_key, api_secret, affiliate_tag, country_code])
12+
13+
14+
@skipUnless(are_credentials_defined(), "Needs Amazon API credentials")
15+
class IntegrationTest(TestCase):
16+
def test_it_works(self):
17+
self.assertTrue(True)

0 commit comments

Comments
 (0)