55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: "Test Helper Module"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- gabby-dev
|
|
- josh-dev
|
|
pull_request:
|
|
types: [opened]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: bash -el {0}
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.11.5]
|
|
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@v4.1.1
|
|
|
|
- name: Set up conda /w python version 3.11.5
|
|
uses: https://github.com/conda-incubator/setup-miniconda@v3.0.4
|
|
with:
|
|
miniconda-version: "latest"
|
|
activate-environment: raid-callouts
|
|
environment-file: environment.yml
|
|
python-version: 3.11.5
|
|
|
|
- name: Install dependencies
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda env create --file environment.yml -n test-helper-module
|
|
conda init
|
|
conda activate test-helper-module
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: add database.ini
|
|
shell: bash -l {0}
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/
|
|
touch database.ini
|
|
echo "${{ secrets.DATABASE_INI }}" >> xiv-database.ini
|
|
|
|
- name: Run tests
|
|
shell: bash -l {0}
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
conda activate test-helper-module
|
|
python -m pytest ./src/py/db_helper_tests.py
|