update README #59
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: Python Tests on macOS | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: macos-latest | |
steps: | |
# Check out the code | |
- name: Check out code | |
uses: actions/checkout@v2 | |
# Set up Python (exact version) | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' # Match the Python version required in pyproject.toml | |
# Install Poetry | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
poetry --version | |
# Regenerate poetry.lock file if needed | |
- name: Regenerate lock file | |
run: | | |
poetry lock --no-update | |
# Verify repository structure | |
- name: Verify repository structure | |
run: | | |
pwd | |
ls -la # Check if pyproject.toml is in the root directory | |
# Install dependencies using Poetry | |
- name: Install dependencies | |
run: | | |
poetry install | |
# Run tests with pytest through Poetry | |
- name: Run tests | |
run: | | |
poetry run pytest |