Skip to content

Commit

Permalink
Adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
VoronM1522 committed Feb 15, 2025
1 parent e38da0d commit 39a5b24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/C++_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ jobs:
python -m pip install --upgrade pip
pip install -r app_C++/requirements.txt
sudo apt update
sudo apt install cppcheck
sudo apt install cppcheck wget
sudo mkdir -p /usr/local/include && sudo wget https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h -O /usr/local/include/httplib.h
- name: Lint with Cppcheck
run: |
cppcheck app_C++/app.cpp
- name: Run tests
run: |
python app_C++/unittests.py
cd app_C++ && python unittests.py
- name: Login to Docker Hub
uses: docker/login-action@v2
Expand Down
8 changes: 2 additions & 6 deletions app_C++/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
FROM alpine:3.19
WORKDIR /app
COPY app.cpp ./
RUN apk add --no-cache \
g++ \
make \
wget \
linux-headers
RUN mkdir /usr/local/include && wget https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h -O /usr/local/include/httplib.h
RUN apk add --no-cache wget g++
RUN mkdir -p /usr/local/include && wget https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h -O /usr/local/include/httplib.h
RUN g++ app.cpp -o app
RUN adduser app_user || $(chown -R app_user:app_user /app && true)
USER app_user
Expand Down

0 comments on commit 39a5b24

Please sign in to comment.