Code Monkey home page Code Monkey logo

autopr-tests's Introduction

AutoPR Tests

Gitpod

AutoPR automatically writes pull requests in response to issues with ChatGPT.

image

The cost of making code, automation and docs for this repository.

Hello, World! in C++

  • Purpose: This simple C++ program demonstrates how to print "Hello, World!" to the console.
  • Source file: hello_world.cpp
  • To compile and run: g++ hello_world.cpp -o hello_world && ./hello_world

Hello, World! in Rust

  • Purpose: This simple Rust program demonstrates how to print "Hello, World!" to the console.
  • Source file: src/hello_world.rs
  • To compile and run: cargo run

autopr-tests's People

Contributors

irgolic avatar konard avatar

Watchers

 avatar

autopr-tests's Issues

Add tests for hello world programs

These tests should be executed in GitHub Actions after Compile and run steps in run_hello_worlds.yml.
Each test should test that each program does indeed output Hello, World! into standard output.
Add a separate test step for each hello world program.

Fix Rust build in .github/workflows /run_hello_worlds.yml

Compile and run Rust Hello World program step failed with error:

Run cargo build --bin hello_world
error: could not find `Cargo.toml` in `/home/runner/work/AutoPR-tests/AutoPR-tests` or any parent directory
Error: Process completed with exit code 101.

Fix issue with GitHub Actions

name: Run Hello World Programs

on:
  push:
    branches:
      - main

jobs:
  run_hello_worlds:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
    - name: Setup C++ environment
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install C++ compiler
      run: sudo apt-get install -y g++
---
 Check failure on line 20 in .github/workflows/run_hello_worlds.yml

GitHub Actions
/ .github/workflows/run_hello_worlds.yml
Invalid workflow file
You have an error in your yaml syntax on line 20
---
    - name: Setup Rust environment
      uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
      - name: Compile and run C++ Hello World program
        run: |
          g++ hello_world.cpp -o hello_world
          ./hello_world
      - name: Compile and run Rust Hello World program
        run: |
          cargo build --bin hello_world
          cargo run --bin hello_world

Fix all errors in run_hello_worlds.yml and remove duplication

Invalid workflow file: .github/workflows/run_hello_worlds.yml#L47You have an error in your yaml syntax on line 47
--
[Invalid workflow file: .github/workflows/run_hello_worlds.yml#L47](https://github.com/Konard/AutoPR-tests/actions/runs/4888007720/workflow)
You have an error in your yaml syntax on line 47

Fix error in GitHub Actions

Run g++ hello_world.cpp -o hello_world
  
/home/runner/work/_temp/dfe0e153-7992-402e-bde3-8b80ac8607c3.sh: line 2: -: command not found
Error: Process completed with exit code 127.

Fix error in .github/workflows/run_hello_worlds.yml

name: Run Hello World Programs

on:
  push:
    branches:
      - main

jobs:
  run_hello_worlds:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
    - name: Setup C++ environment
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install C++ compiler
      run: sudo apt-get install -y g++
    - name: Setup Rust environment
      uses: actions-rs/toolchain@v1
      with:
 Check failure on line 23 in .github/workflows/run_hello_worlds.yml

GitHub Actions
/ .github/workflows/run_hello_worlds.yml
Invalid workflow file
You have an error in your yaml syntax on line 23
        profile: minimal
        toolchain: stable
        - name: Compile and run C++ Hello World program
        run: |
        g++ hello_world.cpp -o hello_world
        ./hello_world
        - name: Compile and run Rust Hello World program
        run: |
        cargo build --bin hello_world
        cargo run --bin hello_world

Rust test is failed

Run grep "Hello, World!" rust_output.txt
grep: rust_output.txt: No such file or directory
Error: Process completed with exit code 2.

Looks like the problem with cargo run --bin hello_world > rust_output.txt command in run_hello_worlds.yml file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.