Skip to content

Commit

Permalink
Merge pull request #85 from freezingsaddles/fix-packages-take-3
Browse files Browse the repository at this point in the history
fix packages take 3
  • Loading branch information
obscurerichard authored Jan 6, 2025
2 parents 6d50616 + ec1156a commit febf68f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Test

on: [push, pull_request] # yamllint disable-line

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.10"]

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
- name: Run tests
run: |
APP_SETTINGS=example.cfg pytest
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include freezing/sync *
2 changes: 1 addition & 1 deletion example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ STRAVA_CLIENT_SECRET=STRAVA_CLIENT_SECRET

# Python Time zone for competition days.
# See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIMEZONE=TIMEZONE:-America/New_York
TIMEZONE=America/New_York

# How long (days) can people upload rides after competition?
UPLOAD_GRACE_PERIOD=7
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dev = [
"flake8",
"isort",
"pre-commit",
"pytest",
"uppd",
]

Expand Down Expand Up @@ -83,3 +84,9 @@ max_line_length=88
[tool.pymarkdown]
plugins.md013.enabled = false
extensions.front-matter.enabled = true

[tool.pytest.ini_options]
pythonpath = "."
addopts = [
"--import-mode=importlib",
]
Empty file added tests/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions tests/test_sync_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from freezing.sync.config import Config


def test_config_present():
assert Config.MAIN_TEAM is not None

0 comments on commit febf68f

Please sign in to comment.