Skip to content

Commit

Permalink
Chore(CI): update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sleelin committed Jan 21, 2025
1 parent 7b586e2 commit 87ca8dc
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 22 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI Report
on:
workflow_run:
workflows: ["CI"]
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
report:
name: Report on Unit Tests
runs-on: ubuntu-latest
steps:
- id: report
uses: dorny/test-reporter@v1
with:
artifact: test-results
name: Unit Test Results
path: results-report.json
reporter: mocha-json
- run: |
echo ":white_check_mark: ${{ steps.report.outputs.passed }} passed / :x: ${{ steps.report.outputs.failed }} failed / :white_circle: ${{ steps.report.outputs.skipped }} skipped" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "[View Full Report](${{ steps.report.outputs.url_html }})" >> $GITHUB_STEP_SUMMARY
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test-ci:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
npm ci
./node_modules/.bin/c8 --reporter=lcovonly npm run test:ci
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: test/results-report.json
- uses: coverallsapp/github-action@v2
if: always()
with:
file: coverage/lcov.info
17 changes: 0 additions & 17 deletions .github/workflows/npm-test.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# This workflow will run tests using node and then publish a package to NPM when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish to NPM

on:
release:
types: [created]

jobs:
publish-npm:
name: Pack and Publish to NPM
Expand Down

0 comments on commit 87ca8dc

Please sign in to comment.