generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (42 loc) · 913 Bytes
/
tests.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
name: "tests"
on:
pull_request:
push:
branches:
- main
- 'releases/*'
schedule:
- cron: '0 12 * * 1'
workflow_dispatch:
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
npm ci
- name: Lint
run: |
npm run lint
- name: Run tests
run: |
npm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Try building
run: |
npm run build
notify:
name: Notify failed build
needs: tests
if: failure() && github.event.pull_request == null
runs-on: ubuntu-latest
steps:
- uses: jayqi/failed-build-issue-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}