From 3b59afdca9e349bf57af7f1724fe26ecf1678572 Mon Sep 17 00:00:00 2001 From: Dmytro Cheholia Date: Wed, 31 Jan 2024 14:43:20 +0000 Subject: [PATCH 1/3] feat: add sum --- show_sum/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 show_sum/main.cpp diff --git a/show_sum/main.cpp b/show_sum/main.cpp new file mode 100644 index 0000000..8538509 --- /dev/null +++ b/show_sum/main.cpp @@ -0,0 +1,13 @@ +#include + +int main( void ) { + size_t one; + size_t two; + size_t sum; + std::cout << "Enter the first number: "; + std::cin >> one; + std::cout << "Enter the second number: "; + std::cin >> two; + sum = one + two; + std::cout << "The sum of " << one << " and " << two << " is " << sum << std::endl; + } \ No newline at end of file From 8216a3902ac546874a7321f458b98baa212e8f6e Mon Sep 17 00:00:00 2001 From: Dmytro Cheholia Date: Mon, 5 Feb 2024 14:16:44 +0000 Subject: [PATCH 2/3] update pre commit --- .github/workflows/pre-commit-check.yaml | 71 +++++++------------------ 1 file changed, 19 insertions(+), 52 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 90b2adf..368e00e 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -9,56 +9,23 @@ jobs: check-code-with-cpp-linter-action: name: Check code with cpp-linter-action runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: cpp-linter/cpp-linter-action@v2 - id: linter + + container-test-job: + runs-on: ubuntu-latest + container: + image: node:18 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - style: file - tidy-checks: 'cppcoreguidelines-*' - # The following value will only update a single comment - # in a pull request's thread. Set it to false to disable the comment. - # Set it to true to post a new comment (and delete the old comment). - thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} - - - name: Fail fast?! - if: steps.linter.outputs.checks-failed > 0 - run: | - echo "Some files failed the linting checks!" - exit 1 - - check-code-with-universum: - name : Check code with universum - runs-on: ubuntu-latest - steps: - - - name: Setup python 3.8 - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - - name: Install dependency - run: | - pip install universum - pip install gitpython - sudo apt-get install clang-format - sudo apt-get install git - - - name: Universum - run: - python -u -m universum - --vcs-type="ghactions" - --ghactions-payload="@${{ github.event_path }}" - --ghactions-token="${{ secrets.GITHUB_TOKEN }}" - --report-to-review - --no-diff - --fail-unsuccessful - - - name: Collect artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: artifacts - path: artifacts + NODE_ENV: development + ports: + - 80 + volumes: + - my_docker_volume:/volume_mount + options: --cpus 1 + steps: + - name: Check for dockerenv file + run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv) + - name: Print github_event file + run: | + echo $GITHUB_EVENT_PATH + cat $GITHUB_EVENT_PATH + \ No newline at end of file From 3123d40e87ee63fcdf9bc421a532adef3130083c Mon Sep 17 00:00:00 2001 From: Dmytro Cheholia Date: Mon, 5 Feb 2024 14:18:16 +0000 Subject: [PATCH 3/3] fix --- .github/workflows/pre-commit-check.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 368e00e..da8929e 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -6,10 +6,6 @@ on: branches: [main, 'feat/*'] jobs: - check-code-with-cpp-linter-action: - name: Check code with cpp-linter-action - runs-on: ubuntu-latest - container-test-job: runs-on: ubuntu-latest container: