Skip to content

Commit

Permalink
build: add new coverage.yml workflow github action (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz authored Apr 26, 2024
1 parent 70bd025 commit b1b9c02
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: node_js CI

on: [pull_request, workflow_dispatch]
on: [pull_request]

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Upload coverage for default branch

on:
push:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Nodejs
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VER }}
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit b1b9c02

Please sign in to comment.