-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.01 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
name: "tests"
on:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
# unit tests
units:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm audit
- run: npm test
# test action works running from the graph
action:
name: Test GH Action
runs-on: ubuntu-latest
steps:
- name: Checkout Locally
uses: actions/checkout@v2
if: ${{ env.ACT }}
with:
path: "stats-action"
- name: Checkout Github
uses: actions/checkout@v2
if: ${{ !env.ACT }}
- name: checks https://beta.gouv.fr/stats
uses: ./
with:
url: https://beta.gouv.fr
uri: 'stats'
output: stats.json
- name: test output
run: |
echo $(cat stats.json)
grade=$(echo $(cat stats.json | jq '.grade'))
echo "grade=$grade"
if [[ -z "$grade" || "$grade" != "\"A\"" ]]; then
exit 1
fi