From 633bfa7cee721fc51c5d91f1ecfb3f3fc906821e Mon Sep 17 00:00:00 2001 From: Ved Gupta Date: Wed, 8 Nov 2023 17:25:34 +0530 Subject: [PATCH] test added --- .github/workflows/main.yaml | 2 +- .github/workflows/test.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 16d178e..19935a5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,7 +7,7 @@ on: jobs: sync-to-hub: - runs-on: ubuntu-latest + runs-on: ubuntu-laest steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..94b3d7d --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,31 @@ +name: Test +on: + push: + workflow_dispatch: + +jobs: + test-api: + runs-on: ubuntu-laest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pytest + + - name: Test with pytest + env: + ACCESS_TOKEN_EXPIRE_MINUTES: ${{ secrets.ACCESS_TOKEN_EXPIRE_MINUTES }} + ALGORITHM: ${{ secrets.ALGORITHM }} + SERVER_NAME: ${{ secrets.SERVER_NAME }} + SERVER_HOST: ${{ secrets.SERVER_HOST }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + POSTGRES_DATABASE_URL: ${{ secrets.POSTGRES_DATABASE_URL }} + run: pytest \ No newline at end of file