diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 6ec58bc2..2c8ab9d5 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -1,10 +1,21 @@ -name: 'Basic Action' +name: 'Run App Asher Lahm' -on: [push] +on: [push, pull_request] jobs: check-bats-version: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - name: Basic Action - run: echo "Hello, World!" \ No newline at end of file + - uses: actions/checkout@v2 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.301' + - uses: nuget/setup-nuget@v1 + - name: Nuget Restore + run: nuget restore GithubActions.sln + - name: Install dependencies + run: dotnet restore GithubActions.sln + - name: Build + run: msbuild /p:Configuration=Release GithubActions.sln + - name: Run Unit Tests + run: mono ./packages/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ./Tests/bin/Release/Tests.dll diff --git a/Console/Program.cs b/Console/Program.cs index 9be02228..e3f82dee 100644 --- a/Console/Program.cs +++ b/Console/Program.cs @@ -43,7 +43,7 @@ static void Main(string[] args) default: throw new ArgumentException("You did not select a valid option!"); } - + //change for a test push var x = GetInput("Enter x: "); var y = GetInput("Enter y: "); var result = operation(x, y); @@ -80,11 +80,9 @@ public static double Divide(string x, string y) { return double.Parse(x) / double.Parse(y); } - - // Implement this method following a similar pattern as above public static double Power(string x, string y) { - throw new NotImplementedException(); + return Math.Pow(double.Parse(x), double.Parse(y)); } } diff --git a/README.md b/README.md index 6a17b113..1ce43826 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Run App](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml) +[![Run App Asher Lahm](https://github.com/Asher-Lahm/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/Asher-Lahm/GithubActions/actions/workflows/run-app.yaml) # Do not submit a pull request to `kgerot/GithubActions` or `dteske/TraviCI`. Not following this instruction can ruin the lab for others, so pay attention.