Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SebSanUwU committed May 15, 2024
1 parent 2277388 commit 4589626
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/main_CenizasGame.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,27 @@ on:
workflow_dispatch:

jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
run: yarn
- name: Test and coverage
run: yarn test --coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build:
name: Build
runs-on: 'ubuntu-latest'

needs: sonarcloud
steps:
- uses: actions/checkout@v2

Expand All @@ -33,29 +51,10 @@ jobs:
with:
push: true
tags: index.docker.io/${{ secrets.AzureAppService_ContainerUsername_0a6fe32b17d946989c59ffa400a65b9f }}/gamedeploy:${{ github.sha }}
file: ./Dockerfile

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
run: yarn
- name: Test and coverage
run: yarn jest --coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

file: ./Dockerfile
deploy:
runs-on: ubuntu-latest
needs: sonarcloud
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
Expand Down

0 comments on commit 4589626

Please sign in to comment.