Skip to content

update to testpypi workflow trigger #22

update to testpypi workflow trigger

update to testpypi workflow trigger #22

Workflow file for this run

# This workflow will install Python dependencies,
# run tests and lint with Python versions 3.9<>3.12
name: Test Py Versions and OS
on:
push:
branches:
- dev_env
jobs:
test-package:
name: Test Package with Python 3.9-3.12 in Ubuntu, Windows, and MacOS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
path: ~/.cache/python
- os: macos-latest
path: ~/Library/Caches/python
- os: windows-latest
path: ~\AppData\Local\python\Cache
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: setuppython
with:
python-version: ${{ matrix.python-version }}
- name: cache dependecies
uses: actions/cache@v4
id: cache
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Poetry
if: steps.cache.outputs.cache-hit != 'true'
run:
python -m pip install --upgrade pip
pip install poetry
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install
- name: Run tests with pytest
env:
HD_REFRESH_TOKEN: ${{ secrets.HD_REFRESH_TOKEN }}
run: poetry run pytest tests/