Skip to content

Commit

Permalink
AppVeyor: skip build for branch with PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanicom committed Aug 3, 2023
1 parent 507c031 commit bcb0481
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
version: 1.0.{build}
image: Visual Studio 2022
environment:
nodejs_version: LTS
install:
- ps: Install-Product node $env:nodejs_version
- npm install sonar-scanner -g
- npm install -g snyk
- npm install -g @angular/cli
- curl -o codecov.exe https://uploader.codecov.io/latest/windows/codecov.exe
cache:
- C:\Users\appveyor\AppData\Roaming\npm\node_modules -> package.json # global npm modules
- C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache
- frontend\node_modules -> package.json # local npm modules
build_script:
- ps: .\rebuild.ps1
after_build:
- curl -F "file=@backend\\tests-results\\tests-results.xml" "https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%"
- curl -F "file=@frontend\\tests-results\\tests-results.xml" "https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%"
- codecov.exe
- set JAVA_HOME=C:\Program Files\Java\jdk19
- set PATH=%JAVA_HOME%\bin;%PATH%
- if defined APPVEYOR_PULL_REQUEST_NUMBER ( set "SONAR_ARGS=-Dsonar.pullrequest.base=%APPVEYOR_REPO_BRANCH% -Dsonar.pullrequest.branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% -Dsonar.pullrequest.key=%APPVEYOR_PULL_REQUEST_NUMBER%" ) else ( set "SONAR_ARGS=-Dsonar.branch.name=%APPVEYOR_REPO_BRANCH%" )
- call sonar-scanner %SONAR_ARGS%
artifacts:
- path: frontend/coverage/index.html
name: Frontend Coverage
- path: backend/coverage/lcov-report/index.html
name: Backend Coverage
- path: frontend/eslint.json
name: Frontend Linting
- path: backend/eslint.json
version: 1.0.{build}
image: Visual Studio 2022
environment:
nodejs_version: LTS
skip_branch_with_pr: true
install:
- ps: Install-Product node $env:nodejs_version
- npm install sonar-scanner -g
- npm install -g snyk
- npm install -g @angular/cli
- curl -o codecov.exe https://uploader.codecov.io/latest/windows/codecov.exe
cache:
- C:\Users\appveyor\AppData\Roaming\npm\node_modules -> package.json # global npm modules
- C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache
- frontend\node_modules -> package.json # local npm modules
build_script:
- ps: .\rebuild.ps1
after_build:
- curl -F "file=@backend\\tests-results\\tests-results.xml" "https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%"
- curl -F "file=@frontend\\tests-results\\tests-results.xml" "https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%"
- codecov.exe
- set JAVA_HOME=C:\Program Files\Java\jdk19
- set PATH=%JAVA_HOME%\bin;%PATH%
- if defined APPVEYOR_PULL_REQUEST_NUMBER ( set "SONAR_ARGS=-Dsonar.pullrequest.base=%APPVEYOR_REPO_BRANCH% -Dsonar.pullrequest.branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% -Dsonar.pullrequest.key=%APPVEYOR_PULL_REQUEST_NUMBER%" ) else ( set "SONAR_ARGS=-Dsonar.branch.name=%APPVEYOR_REPO_BRANCH%" )
- call sonar-scanner %SONAR_ARGS%
artifacts:
- path: frontend/coverage/index.html
name: Frontend Coverage
- path: backend/coverage/lcov-report/index.html
name: Backend Coverage
- path: frontend/eslint.json
name: Frontend Linting
- path: backend/eslint.json
name: Backend Linting

0 comments on commit bcb0481

Please sign in to comment.