Skip to content

packages:js:fix-test-script #75

packages:js:fix-test-script

packages:js:fix-test-script #75

Workflow file for this run

name: "packages.js"
on:
push:
paths:
- packages/js/**
- .github/workflows/packages.js.yaml
jobs:
main:
runs-on: ubuntu-latest
env:
working-directory: ./packages/js
steps:
- name: checkout
uses: actions/checkout@v2
- name: node
uses: actions/setup-node@v2
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Validate schema
working-directory: ${{env.working-directory}}
run: npm run schema:validate
- name: install
working-directory: ${{env.working-directory}}
run: npm ci
- name: lint
working-directory: ${{env.working-directory}}
run: npm run lint
- name: test
working-directory: ${{env.working-directory}}
env:
FORCE_COLOR: 1
run: npm run test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
directory: packages/js
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to CodeClimate
uses: paambaati/codeclimate-action@v5.0.0
with:
workingDirectory: packages/js
env:
CC_TEST_REPORTER_ID: ${{secrets.CODE_CLIMATE_TOKEN}}
- name: build
working-directory: ${{env.working-directory}}
run: npm run build
- name: publish
working-directory: ${{env.working-directory}}
if: ${{ github.ref_type == 'tag' }}
run: |
npm version $GITHUB_REF_NAME
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}