Review comments fix: run npm install only with our build, npm install only dev for releases
This commit is contained in:
parent
86c45b19f2
commit
00c14b274c
2 changed files with 17 additions and 4 deletions
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
|
@ -17,13 +17,25 @@ jobs:
|
|||
- name: 'Checking out repo code'
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: 'Validate build'
|
||||
- name: Extract branch name
|
||||
id: extract_branch
|
||||
run: |
|
||||
echo "##[set-output name=branchname;]$(echo ${GITHUB_REF##*/})"
|
||||
|
||||
- name: 'Install dependency for master'
|
||||
if: github.event.pull_request.base.ref == 'master' || steps.extract_branch.outputs.branchname == 'master'
|
||||
run: |
|
||||
npm install
|
||||
npm build
|
||||
|
||||
- name: 'Install dependency for releases'
|
||||
if: github.event.pull_request.base.ref == 'releases/v1' || steps.extract_branch.outputs.branchname == 'releases/v1'
|
||||
run: |
|
||||
npm install --only=dev
|
||||
|
||||
- name: 'Run L0 tests'
|
||||
run: |
|
||||
npm run test
|
||||
|
||||
- name : 'Run test coverage'
|
||||
if: runner.os == 'Windows'
|
||||
env:
|
||||
|
@ -65,4 +77,5 @@ jobs:
|
|||
$headers = @{
|
||||
"Authorization" = "token ${env:GITHUB_TOKEN}"
|
||||
}
|
||||
Invoke-RestMethod -Method POST -Uri $url -Headers $headers -Body "{ `"body`": `"${comment}`" }"
|
||||
$body = "{ `"body`": `"${comment}`" }"
|
||||
Invoke-RestMethod -Method POST -Uri $url -Headers $headers -Body $body
|
Loading…
Add table
Reference in a new issue