2019-09-26 16:25:26 +03:00
|
|
|
name: JS Tests
|
2020-10-29 19:26:15 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-03-22 09:03:51 +02:00
|
|
|
branches:
|
|
|
|
- main
|
2020-10-29 19:26:15 +02:00
|
|
|
pull_request:
|
2021-12-02 23:02:11 +02:00
|
|
|
workflow_dispatch:
|
2020-10-29 19:26:15 +02:00
|
|
|
|
2019-10-08 08:47:40 +03:00
|
|
|
env:
|
2020-11-23 21:32:25 +02:00
|
|
|
FORCE_COLOR: 2
|
2022-11-13 16:19:29 +02:00
|
|
|
NODE: 18
|
2019-08-08 09:40:26 -07:00
|
|
|
|
2022-12-16 12:50:12 +05:30
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2019-08-08 09:40:26 -07:00
|
|
|
jobs:
|
|
|
|
run:
|
2022-12-16 12:50:12 +05:30
|
|
|
permissions:
|
|
|
|
# allow coverallsapp/github-action to create new checks issues and fetch code
|
|
|
|
checks: write
|
|
|
|
contents: read
|
2021-12-10 16:40:32 +02:00
|
|
|
name: JS Tests
|
2019-08-08 09:40:26 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2019-08-24 02:32:29 +03:00
|
|
|
- name: Clone repository
|
2022-03-02 16:51:46 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-11-09 09:21:55 +02:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2019-08-09 18:28:41 +03:00
|
|
|
|
2020-10-29 19:26:15 +02:00
|
|
|
- name: Set up Node.js
|
2022-03-01 15:19:34 +02:00
|
|
|
uses: actions/setup-node@v3
|
2019-08-09 18:28:41 +03:00
|
|
|
with:
|
2021-12-10 16:40:32 +02:00
|
|
|
node-version: ${{ env.NODE }}
|
2021-07-19 18:38:49 +03:00
|
|
|
cache: npm
|
2019-12-13 17:12:03 +02:00
|
|
|
|
2019-08-09 18:28:41 +03:00
|
|
|
- name: Install npm dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
2019-09-26 16:25:26 +03:00
|
|
|
- name: Run dist
|
|
|
|
run: npm run js
|
2019-08-09 18:28:41 +03:00
|
|
|
|
2019-09-26 16:25:26 +03:00
|
|
|
- name: Run JS tests
|
|
|
|
run: npm run js-test
|
2019-08-09 18:28:41 +03:00
|
|
|
|
|
|
|
- name: Run Coveralls
|
2023-03-21 15:18:24 +02:00
|
|
|
uses: coverallsapp/github-action@v2
|
2019-11-18 21:03:43 +02:00
|
|
|
with:
|
|
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
path-to-lcov: "./js/coverage/lcov.info"
|