Dev #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] # Define the Python versions you want to test | |
steps: | |
- name: Check disk usage | |
run: df -h | |
# - name: Clean up disk space | |
# run: sudo rm -rf /tmp/* /var/tmp/* | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Poetry dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pypoetry | |
~/.venv | |
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry-${{ matrix.python-version }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Run tests | |
run: poetry run pytest # Adjust according to your test framework | |
- name: Clean up disk space | |
run: sudo rm -rf /tmp/* /var/tmp/* |