Tests In Browser|API|Marketplace #277
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
# This workflow will build and test a .NET 6 web API | |
# | |
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples | |
name: Tests In Browser|API|Marketplace | |
on: | |
#manually trigger deploy | |
workflow_dispatch: | |
# Trigger the workflow on push | |
#push: | |
# branches: | |
# - develop | |
# - main | |
#pull_request: | |
# branches: | |
# - develop | |
# - main | |
env: | |
# set this to the path to your solution file, defaults to the repository root (this is the folder in the git repo) | |
SOLUTION_DIRECTORY: './' | |
# set this to the path to your web app project, defaults to the repository root (this is the folder in the git repo) | |
PROJECT_DIRECTORY: './api/CESMII.Marketplace.Api' | |
# Solution file to use | |
SOLUTION_FILE: 'CESMII.Marketplace.sln' | |
# Project file to use | |
PROJECT_NAME: 'CESMII.Marketplace.Api' | |
# set this to the .NET core version to use | |
NETCORE_VERSION: "6.0.x" | |
jobs: | |
build: | |
name: Tests In Browser | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up dotnet Core ${{ env.NETCORE_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.NETCORE_VERSION }} | |
- name: Restore dependencies (${{env.SOLUTION_FILE}}) | |
run: dotnet restore ${{env.SOLUTION_FILE}} | |
working-directory: ${{env.SOLUTION_DIRECTORY}} | |
- name: Build (${{env.SOLUTION_FILE}}) | |
run: dotnet build ${{env.SOLUTION_FILE}} --configuration Staging --no-restore | |
working-directory: ${{env.SOLUTION_DIRECTORY}} | |
#- name: Setup ChromeDriver (version 88.0.4324.96) | |
# uses: nanasess/setup-chromedriver@v2 | |
# with: | |
# # Optional: do not specify to match Chrome's version | |
# chromedriver-version: '88.0.4324.96' | |
#- name: Run ChromeDriver | |
# run: | | |
# export DISPLAY=:99 | |
# chromedriver --url-base=/wd/hub --whitelisted-ips="" & | |
# sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional | |
- name: Set up chrome (driver?) | |
uses: browser-actions/setup-chrome@latest | |
- name: Run browser | |
run: chrome --version | |
- name: Run Test on (${{env.SOLUTION_FILE}}) | |
run: dotnet test ${{env.SOLUTION_DIRECTORY}}api/Tests/CESMII.Marketplace.InBrowser.Tests/CESMII.Marketplace.InBrowser.Tests.csproj --configuration Staging --verbosity normal -l:"console;verbosity=normal" | |
working-directory: ${{env.SOLUTION_DIRECTORY}} |