From 181055e19b164c955c5558ba5d3d687e6454a191 Mon Sep 17 00:00:00 2001 From: sarah-gaskov Date: Wed, 18 Feb 2026 11:29:10 -0800 Subject: [PATCH 1/4] Fixed the no exit on first 'nothing' input bug --- main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index d9884f9..e40ddac 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include using std::cout; using std::cin; @@ -24,13 +25,13 @@ int main(){ transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); cout << VALIDATION[pick] << "! Let's listen to more\n"; - do{ + while( input != "nothing" ){ cout << "What's next?\n"; getline(cin,input); transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); pick = rand() % VALIDATION.size(); cout << VALIDATION[pick] << "!\n"; - }while( input != "nothing" ); + } return 0; } \ No newline at end of file From 9c90f9c1323dd564b065e1227ae5b0196eb173cc Mon Sep 17 00:00:00 2001 From: sarah-gaskov Date: Wed, 18 Feb 2026 11:40:28 -0800 Subject: [PATCH 2/4] Added continous integration flow --- .github/workflows/compile.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..d09455f --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,17 @@ +name: Build C++ + +on: + push: + branches: "**" + pull_request: + branches: [ main ] + branches: [ devops ] + +jobs: + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build project + run: g++ -std=c++17 main.cpp \ No newline at end of file From 40fcd2406f1cc2a1d366af0ae71cc61213418f9a Mon Sep 17 00:00:00 2001 From: sarah-gaskov Date: Wed, 18 Feb 2026 11:45:11 -0800 Subject: [PATCH 3/4] fixed continuous integration formatting --- .github/workflows/compile.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index d09455f..5553307 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -4,8 +4,7 @@ on: push: branches: "**" pull_request: - branches: [ main ] - branches: [ devops ] + branches: [ main devops ] jobs: build: From 14d6df4628bd63527369251d9b4c44070170e645 Mon Sep 17 00:00:00 2001 From: sarah-gaskov Date: Wed, 18 Feb 2026 11:48:14 -0800 Subject: [PATCH 4/4] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bbcf55a..ab39779 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,6 @@ I like that app too! -This repo is compatible with the [cpp-container docker container](https://github.com/ChicoState/cpp-container). \ No newline at end of file +This repo is compatible with the [cpp-container docker container](https://github.com/ChicoState/cpp-container). + +[![.github/workflows/compile.yml](https://github.com/sarah-gaskov/autovalidate/actions/workflows/compile.yml/badge.svg)](https://github.com/sarah-gaskov/autovalidate/actions/workflows/compile.yml)