Create a CI workflow with GitHub Actions to run the tests automatically.
dotnet build
dotnet test
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/{name-of-your-repository}
git push -u origin main
SetUp()
method of the project to run Chrome in a headless mode within the CI environment.git commit -am "Update SetUp method for headless Chrome"
git push
.github
and inside it create another one called workflows
.workflows
folder, create a YAML file for the workflow definition.- name: Checkout code
uses: actions/checkout@v2
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Install Chrome
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- name: Install dependencies
run: dotnet restore
- name: Build the solution
run: dotnet build --no-restore
- name: Run the test project
env:
CHROMEWEBDRIVER: /usr/bin/google-chrome
run: dotnet test --verbosity normal
git add .
git commit -m "Add CI workflow"
git push
Contributions are welcome! If you have any improvements or bug fixes, feel free to open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please open an issue in the repository.