Merge pull request #5 from Purdue-ACM-SIGAPP/CI-1 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ASP.NET CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code from your repository | |
- uses: actions/checkout@v4 | |
# Setup .NET Core SDK (for .NET 6) | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
# Restore dependencies | |
- name: Restore dependencies | |
run: dotnet restore | |
# Build the project | |
- name: Build | |
run: dotnet build --no-restore | |
# Run the project to check if it can start up | |
- name: Run the project | |
run: dotnet run --project SimpleWebAppReact.csproj --urls=http://localhost:5431 & | |
# Wait a bit to see if the app runs (10 seconds) | |
- name: Wait | |
run: sleep 10 | |
# Check if localhost is running (basic test to see if it started) | |
- name: Check if localhost responds | |
run: curl --fail http://localhost:5431 || exit 1 |