Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build containers
run: docker compose build
- name: Build test image (with cache)
uses: docker/build-push-action@v6
with:
context: ./main
file: ./main/Dockerfile
target: dev
tags: metamon-ci:test
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run tests in container
run: |
docker compose up -d
docker exec hometamon pytest tests

- name: Tear down
if: always()
run: docker compose down
- name: Run tests in image
run: docker run --rm metamon-ci:test pytest tests
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# AGETNT.md

##
##

- エラーが隠蔽されるので必要な部分以外でフォールバックを使わないでください
12 changes: 6 additions & 6 deletions main/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pykakasi==1.2",
"pytest==8.3.4",
"pytest-mock==3.14.0",
"python-dotenv==1.0.0",
"tqdm==4.36.1",
"tweepy==3.8.0",
"black>=26.1.0",
"pykakasi>=2.3.0",
"pytest>=9.0.2",
"pytest-mock>=3.15.1",
"python-dotenv>=1.2.1",
"tqdm>=4.67.3",
"tweepy>=4.16.0",
]

[tool.uv]
Expand Down
8 changes: 4 additions & 4 deletions main/src/hometamon.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self):
elif os.path.dirname("/images"):
self.image_dir = "/images"

consumer_key = os.environ.get("CONSUMER_KEY")
consumer_secret = os.environ.get("CONSUMER_SECRET")
access_token = os.environ.get("ACCESS_TOKEN")
token_secret = os.environ.get("TOKEN_SECRET")
consumer_key = os.environ.get("CONSUMER_KEY") or ""
consumer_secret = os.environ.get("CONSUMER_SECRET") or ""
access_token = os.environ.get("ACCESS_TOKEN") or ""
token_secret = os.environ.get("TOKEN_SECRET") or ""

auth = tweepy.OAuthHandler(
consumer_key=consumer_key, consumer_secret=consumer_secret
Expand Down
Loading
Loading