diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 90b2adf..da8929e 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -6,59 +6,22 @@ on: branches: [main, 'feat/*'] 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 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