Skip to content

Add functionalities to pipeline #20

Add functionalities to pipeline

Add functionalities to pipeline #20

name: Python unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.5'
- name: List directories
run: |
echo "Current directory:"
pwd
echo "List of files in current directory:"
ls -la
echo "List of files in src directory:"
ls -la src/
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install -r requirements.txt
- name: Set PYTHONPATH
run: echo "PYTHONPATH=${{ github.workspace }}" >> $GITHUB_ENV
- name: Run pytest
run: pytest tests/unit