0.0.32 Release (#459) #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Master CI | |
on: | |
push: | |
branches: | |
- master | |
env: | |
CI: true | |
GITHUB_BRANCH: ${{ github.ref }} | |
GITHUB_HEAD_REF: ${{ github.head_ref }} | |
GITHUB_BASE_REF: ${{ github.base_ref }} | |
GITHUB_COMMIT: ${{ github.sha }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node-version: [16.x, 18.x, 19.x, 20.x] | |
steps: | |
- uses: actions/[email protected] | |
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: nodejs project information | |
id: projectinfo | |
uses: gregoranders/nodejs-project-info@master | |
- name: npm install | |
run: | | |
npm install | |
- name: npm test | |
run: | | |
npm test | |
- name: npm run build | |
run: | | |
npm run build | |
- name: code coverage | |
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./test/coverage/lcov.info | |
- name: publish code coverage to code climate | |
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageCommand: npm test | |
coverageLocations: | | |
./test/coverage/lcov.info:lcov | |
- name: run codacy-coverage-reporter | |
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' | |
uses: codacy/codacy-coverage-reporter-action@master | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: ./test/coverage/lcov.info | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
with: | |
check_name: Unit Test Results node${{ matrix.node-version }}-${{ matrix.os }} | |
files: test/junit.xml | |
- name: create release | |
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' | |
id: createrelease | |
uses: gregoranders/nodejs-create-release@master | |
env: | |
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag: v${{ steps.projectinfo.outputs.version }} | |
name: ${{ steps.projectinfo.outputs.version }} Release | |
body: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release | |
target: ${{ github.ref }} | |
draft: false |