ci: Enhance test workflow (#301)
- Add ubuntu-16.04 - Bump actions/upload-artifact from v1 to v2 - Fix coverage artifact name
This commit is contained in:
parent
55117bdfe7
commit
0b128ac232
|
@ -26,6 +26,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- 'ubuntu-18.04'
|
- 'ubuntu-18.04'
|
||||||
|
- 'ubuntu-16.04'
|
||||||
- 'macos-latest'
|
- 'macos-latest'
|
||||||
- 'windows-latest'
|
- 'windows-latest'
|
||||||
steps:
|
steps:
|
||||||
|
@ -41,27 +42,26 @@ jobs:
|
||||||
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
||||||
|
|
||||||
- run: npm i -g npm
|
- run: npm i -g npm
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|
||||||
- name: Run prettier
|
- name: Run prettier
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu-18.04')
|
||||||
run: npm run format:check
|
run: npm run format:check
|
||||||
|
|
||||||
- name: Run eslint
|
- name: Run eslint
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu-18.04')
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Run ncc
|
- name: Run ncc
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu-18.04')
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
- name: Upload test coverage as artifact
|
- name: Upload test coverage as artifact
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage-${{ matrix.os }}
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
|
|
Loading…
Reference in New Issue