Update dotnet.yml #9
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: Build and tests | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
static-analysis: | |
name: Build and tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build project | |
run: dotnet build --no-restore --configuration Release | |
- name: Upload analysis report (optional) | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: static-analysis-report | |
path: ./path-to-report | |
- name: Set up Docker | |
run: | | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
continue-on-error: false | |
- name: Set up Docker Compose | |
run: | | |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
docker-compose --version | |
- name: Run Docker Compose | |
run: | | |
cd TestUtilities/DockerFiles && docker-compose up --scale chrome=3 --scale edge=3 -d | |
shell: bash | |
- name: Wait for Docker Compose to start (30 seconds) | |
run: sleep 30s | |
- name: Run tests | |
run: | | |
dotnet test --configuration Release --no-build |