-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 903 Bytes
/
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
name: Integraton Test
on:
push:
branches:
- '**'
- '!main'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: 12
- name: Reading Time to Manifest Action
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test output
uses: actions/github-script@v4
with:
script: |
const test = require('./docs/manifest.json');
if (!test) {
core.setFailed('manifest not found');
}
if (!test || !test.routes || test.routes.length <= 0) {
core.setFailed('routes were not found');
}
if(!test.routes[0].routes[0].readingTime.text) {
core.setFailed('readingTime object was not found');
}