-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.28 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'build-test-coverage'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm ci
- run: |
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: Install dependencies
run: npm ci
- name: Rebuild the dist/ directory
run: |
npm run build
npm run package
- run: |
npm run test:cov
- run: echo ${{ github.event.issue}}
- run: echo ${{ github.sha}}
- if: github.event_name == 'pull_request'
uses: ./
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
COVERAGE_FILE_PATH: "./coverage/lcov.info"
COVERAGE_FORMAT: "lcov"
DEBUG: coverage
- if: github.event_name == 'pull_request' || github.event_name == 'push'
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}