Skip to content

Commit

Permalink
use amazon credentials on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioteula committed Oct 9, 2024
1 parent 33649e3 commit 244c189
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
permissions:
pull-requests: read

env:
API_KEY: ${{ secrets.API_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }}
COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }}

jobs:
ruff:
runs-on: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions tests/integration_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os
from unittest import TestCase, skipUnless


def are_credentials_defined() -> bool:
api_key = os.environ.get("API_KEY")
api_secret = os.environ.get("API_SECRET")
affiliate_tag = os.environ.get("AFFILIATE_TAG")
country_code = os.environ.get("COUNTRY_CODE")

return all([api_key, api_secret, affiliate_tag, country_code])


@skipUnless(are_credentials_defined(), "Needs Amazon API credentials")
class IntegrationTest(TestCase):
def test_it_works(self):
self.assertTrue(True)

0 comments on commit 244c189

Please sign in to comment.