Skip to content

Actions fix (#53)

Actions fix (#53) #14

Workflow file for this run

name: Python unit test
on:
push:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: false
virtualenvs-path: ~/.virtualenvs
- name: Create .env file
uses: SpicyPizza/[email protected]
with:
file_name: .env
envkey_ELSEVIER: "dummykey"
- name: Cache Poetry virtualenv
uses: actions/cache@v3
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Test with pytest
run: poetry run pytest