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'
|
- name: 'Checking out repo code'
|
||||||
uses: actions/checkout@v1
|
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: |
|
run: |
|
||||||
npm install
|
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'
|
- name: 'Run L0 tests'
|
||||||
run: |
|
run: |
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
- name : 'Run test coverage'
|
- name : 'Run test coverage'
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
env:
|
env:
|
||||||
|
@ -65,4 +77,5 @@ jobs:
|
||||||
$headers = @{
|
$headers = @{
|
||||||
"Authorization" = "token ${env:GITHUB_TOKEN}"
|
"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
|
|
@ -1,4 +1,4 @@
|
||||||
import {run} from '../src/run'
|
import { run } from '../src/run'
|
||||||
|
|
||||||
describe('This is a placeholder for intial test cases, to be removed', () => {
|
describe('This is a placeholder for intial test cases, to be removed', () => {
|
||||||
test('Dummy test case', async () => {
|
test('Dummy test case', async () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue