diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 6ec58bc2..0187936f 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -1,10 +1,19 @@ -name: 'Basic Action' +name: 'Run App Luis (Felipe) Rojas' -on: [push] +on: [push, pull_request] jobs: check-bats-version: runs-on: ubuntu-latest 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 \ No newline at end of file diff --git a/Console/Program.cs b/Console/Program.cs index 9be02228..213f828b 100644 --- a/Console/Program.cs +++ b/Console/Program.cs @@ -84,7 +84,7 @@ public static double Divide(string x, string y) // Implement this method following a similar pattern as above public static double Power(string x, string y) { - throw new NotImplementedException(); + return double.Parse(x).Power(double.Parse(y)); } } diff --git a/README.md b/README.md index 6a17b113..c812a750 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 Luis (Felipe) Rojas](https://github.com/Felipe-Rojas442/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/Felipe-Rojas442/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. @@ -22,7 +22,7 @@ Currently, there should be one job that has run successfully. ![Actions Tab](./img/actions-tab.PNG) -If you open that job, you'll see we've programmed the action to just echo `Hello, World!`. If yo ucannot find a job, that's okay. Sometimes Github will not run an action immediately upon forking. +If you open that job, you'll see we've programmed the action to just echo `Hello, World!`. If you cannot find a job, that's okay. Sometimes Github will not run an action immediately upon forking. We want our action to build our project. To do this, navigate to the file `.github/workflows/run-app.yaml`. This is where we have define a workflow that runs a process called `Basic Action` that echos `Hello, World!`. It runs on the latest Ubuntu OS and runs everytime you push.