Commit 179a4c1 1 parent 7b4e3b5 commit 179a4c1 Copy full SHA for 179a4c1
File tree 4 files changed +51
-16
lines changed
4 files changed +51
-16
lines changed Original file line number Diff line number Diff line change
1
+ .git
2
+ __pycache__
3
+ .venv
4
+ tests
5
+ * .pyc
Original file line number Diff line number Diff line change 9
9
- name : Checkout repository
10
10
uses : actions/checkout@v4
11
11
12
- - name : Set up Python
13
- uses : actions/setup-python@v4
12
+ - name : Set up Docker Buildx
13
+ uses : docker/setup-buildx-action@v2
14
+
15
+ - name : Cache Docker layers
16
+ uses : actions/cache@v3
14
17
with :
15
- python-version : " 3.10"
18
+ path : /tmp/.buildx-cache
19
+ key : ${{ runner.os }}-buildx-${{ github.sha }}
20
+ restore-keys : |
21
+ ${{ runner.os }}-buildx-
16
22
17
- - name : Install Poetry
18
- uses : snok/install-poetry@v1
23
+ - name : Build Docker image
24
+ run : docker build -t focusfeed .
19
25
20
- - name : Install dependencies
21
- run : |
22
- poetry install
23
- poetry add ruff --group dev
26
+ - name : Run tests in Docker
27
+ run : docker run focusfeed poetry run pytest tests/
24
28
25
- - name : Run ruff format
26
- run : poetry run ruff format . --check
29
+ - name : Format with Ruff
30
+ run : docker run focusfeed poetry run ruff format . --check
27
31
28
- - name : Run ruff lint
29
- run : poetry run ruff check .
32
+ - name : Lint with Ruff
33
+ run : docker run focusfeed poetry run ruff check .
Original file line number Diff line number Diff line change
1
+ # Use the official Python 3.10 image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV POETRY_VERSION=1.1.13
6
+ ENV POETRY_HOME="/opt/poetry"
7
+ ENV POETRY_VIRTUALENVS_CREATE=false
8
+
9
+ # Install Poetry
10
+ RUN apt-get update && apt-get install -y curl && \
11
+ curl -sSL https://install.python-poetry.org | python3 - && \
12
+ ln -s $POETRY_HOME/bin/poetry /usr/local/bin/poetry
13
+
14
+
15
+ # Set the working directory
16
+ WORKDIR /app
17
+
18
+ # Copy the project files
19
+ COPY . .
20
+
21
+ # Install dependencies
22
+ RUN poetry install --no-dev
23
+
24
+ # Expose the port the app runs on
25
+ EXPOSE 8000
26
+
27
+ # Set the entry point
28
+ CMD ["poetry" , "run" , "focusfeed" ]
Original file line number Diff line number Diff line change 1
1
import sys
2
2
3
- from src .auth import Authenticator
4
-
5
3
6
4
class InstagramBot :
7
5
def __init__ (self ):
8
- self .auth = Authenticator ()
6
+ self .auth = "Hello"
9
7
self .loader = None
10
8
11
9
def display_menu (self ):
You can’t perform that action at this time.
0 commit comments