Skip to content

fix smoke tests pr

fix smoke tests pr #12

Workflow file for this run

name: Smoke test
on:
push:
branches:
- master
schedule:
- cron: '0 12 * * 0' # Run every Sunday at 12:00 PM (noon)
workflow_dispatch: # Allows manual triggering
env:
python-version: "3.12"
concurrency:
group: "smoke-test" # Make sure, to not run multiple smoke tests at the same time
cancel-in-progress: false
jobs:
smoke_test:
runs-on: ubuntu-latest
steps:
- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: read
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Check secret access
run: |
if [[ "x${{ secrets.PASSWORD }}" != "x" ]]; then
echo "Access to secrets"
else
echo "No access to secrets"
exit 1
fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
playwright install chromium
- name: Prepare empty cookies
run: touch .cookies
- name: Test with pytest
run: pytest smoke_test -v -x
env:
EMAIL: ${{ vars.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
# - name: Upload cookies for next workflow
# uses: actions/upload-artifact@v4
# if: success() || failure()
# with:
# name: cookies
# path: ./.cookies
# include-hidden-files: true
# retention-days: 30
- name: Upload out dir with screenshots and traces
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: out_dir_with_screenshots_and_traces
path: out
retention-days: 14