diff --git a/.github/workflows/check_code.yaml b/.github/workflows/check_code.yaml index b7bcb23..74ae1b4 100644 --- a/.github/workflows/check_code.yaml +++ b/.github/workflows/check_code.yaml @@ -9,6 +9,8 @@ on: - opened - reopened - synchronize + schedule: + - cron: "0 3 * * *" # time zone is UTC jobs: fourc-webviewer-code-check: diff --git a/.github/workflows/run_testsuite.yaml b/.github/workflows/run_testsuite.yaml new file mode 100644 index 0000000..a0cb248 --- /dev/null +++ b/.github/workflows/run_testsuite.yaml @@ -0,0 +1,41 @@ +name: Testsuite + +on: + push: + branches: + - main + pull_request: + types: + - opened + - reopened + - synchronize + schedule: + - cron: "0 3 * * *" # time zone is UTC + +jobs: + run_pytest: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up virtual environment + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + conda-remove-defaults: true + activate-environment: 4c-webviewer + python-version: 3.12 + - name: Install requirements + shell: bash -el {0} + run: | + conda activate 4c-webviewer + pip install -e . + - name: Run pytest + shell: bash -el {0} + run: | + conda activate 4c-webviewer + pytest --color=yes -v