From bea5486adab0ca32af14692013124f54ba8f36ea Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Mon, 22 Jul 2024 16:06:23 +0000 Subject: [PATCH] match what we have in github --- .gitea/workflows/execute.yaml | 60 +++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/.gitea/workflows/execute.yaml b/.gitea/workflows/execute.yaml index 346353a..0776a35 100644 --- a/.gitea/workflows/execute.yaml +++ b/.gitea/workflows/execute.yaml @@ -7,31 +7,37 @@ env: jobs: build: - runs-on: python-latest - + runs-on: ubuntu-gitea + strategy: + matrix: + python-version: ["3.12"] steps: - - name: Clone Repo - run: - git clone https://repos.gmgauthier.com/gmgauthier/pytest-api.git . - && ls -la - - name: Prep Python Environment - run: - python -m pip install -r requirements.txt - && touch .env.gw - && touch .env.qa - - name: Run Open Api Tests - run: - echo "API_URL=${{ vars.GAMMA_WORLD_API_URL }}" >> .env.gw - && pytest -rA --durations=0 --color=auto --config-file=./pytest.ini -m rules - - name: Run Oauth2 Api Tests - run: - echo "API_URL=${{ secrets.EDD_QA_API_URL }}" >> .env.qa - && echo "CLIENT_ID=${{ secrets.EDD_CLIENT_ID }}" >> .env.qa - && echo "CLIENT_SECRET=${{ secrets.EDD_CLIENT_SECRET }}" >> .env.qa - && echo "TOKEN_FETCH_URL=${{ secrets.EDD_TOKEN_FETCH_URL }}" >> .env.qa - && echo "LOGIN=${{ secrets.EDD_QA_LOGIN }}" >> .env.qa - && echo "PASSWORD=${{ secrets.EDD_QA_PWD }}" >> .env.qa - && echo "AUDIENCE=${{ secrets.EDD_AUDIENCE }}" >> .env.qa - && echo "SCOPES=${{ secrets.EDD_SCOPES }}" >> .env.qa - && pytest -rA --durations=0 --color=auto --config-file=./pytest.ini -m get - + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + python -m pip install -r requirements.txt + - name: Prep Env Files + run: | + touch .env.gw + touch .env.qa + - name: Run Open Api Tests + run: | + echo "API_URL=${{ vars.GAMMA_WORLD_API_URL }}" >> .env.gw + pytest -rA --durations=0 --color=auto --config-file=./pytest.ini -m rules + - name: Run Oauth2 Api Tests + run: | + echo "API_URL=${{ secrets.EDD_QA_API_URL }}" >> .env.qa + echo "CLIENT_ID=${{ secrets.EDD_CLIENT_ID }}" >> .env.qa + echo "CLIENT_SECRET=${{ secrets.EDD_CLIENT_SECRET }}" >> .env.qa + echo "TOKEN_FETCH_URL=${{ secrets.EDD_TOKEN_FETCH_URL }}" >> .env.qa + echo "LOGIN=${{ secrets.EDD_QA_LOGIN }}" >> .env.qa + echo "PASSWORD=${{ secrets.EDD_QA_PWD }}" >> .env.qa + echo "AUDIENCE=${{ secrets.EDD_AUDIENCE }}" >> .env.qa + echo "SCOPES=${{ secrets.EDD_SCOPES }}" >> .env.qa + pytest -rA --durations=0 --color=auto --config-file=./pytest.ini -m get