Skip to content

Commit

Permalink
add github action config
Browse files Browse the repository at this point in the history
  • Loading branch information
phn210 committed Oct 1, 2024
1 parent 1e1f2ed commit e57a75e
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# ci.yml
#
# Run tests for all pushed commits and opened pull requests on Github.
#

name: CI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Clean global cache
run: npm cache clean --force
- name: Set up Node
uses: actions/checkout@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: CI build & test
run: |
npm run build --if-present
npm run coverage
env:
CI: true
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
COVERALLS_REPO_TOKEN: ${{ secrets.ORG_ACTION_TOKEN }}
flag-name: node-${{ matrix.node-version }}
parallel: true
coveralls-finish:
name: Coveralls Webhook
needs: build
if: needs.build.result == 'success'
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
COVERALLS_REPO_TOKEN: ${{ secrets.ORG_ACTION_TOKEN }}
parallel-finished: true

0 comments on commit e57a75e

Please sign in to comment.