forked from SocialGouv/dashlord
-
Notifications
You must be signed in to change notification settings - Fork 1
134 lines (119 loc) · 4.14 KB
/
scans.yml
File metadata and controls
134 lines (119 loc) · 4.14 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: DashLord scans
on:
workflow_dispatch:
inputs:
edition_id:
description: "Edition ID (optional - if not provided, uses current edition based on date)"
required: false
type: string
schedule:
- cron: "0 1 * * *" # see https://crontab.guru
# allow only one concurrent scan action
concurrency:
cancel-in-progress: true
group: scans
jobs:
init:
runs-on: ubuntu-latest
name: Prepare
outputs:
json: ${{ steps.init.outputs.json }}
steps:
- uses: actions/checkout@v4
- id: init
uses: "DISIC/dashlord-observatoire/actions/grist-procedures-urls@main"
with:
grist_api_key: ${{ secrets.GRIST_API_KEY }}
jdma_api_key: ${{ secrets.JDMA_TOKEN }}
updown_api_key: ${{ secrets.UPDOWNIO_API_KEY }}
grist_base_id: ${{ secrets.GRIST_BASE_ID }}
grist_procedures_table_id: ${{ secrets.GRIST_TABLE_ID }}
grist_editions_table_id: ${{ secrets.GRIST_EDITIONS_TABLE_ID }}
edition_id: ${{ github.event.inputs.edition_id }}
output: grist-procedures_urls.json
scans:
runs-on: ubuntu-latest
name: Scan
needs: init
continue-on-error: true
strategy:
fail-fast: false
max-parallel: 2
matrix:
sites: ${{ fromJson(needs.init.outputs.json) }}
steps:
- uses: actions/checkout@v4
- run: |
mkdir scans
- uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Déclaration a11y
if: false
continue-on-error: true
uses: "socialgouv/dashlord-actions/declaration-a11y@feat/a11y-output-url"
id: declaration-a11y
with:
url: ${{ matrix.sites.link }}
output: scans/declaration-a11y.json
- name: RGAA
continue-on-error: true
# if: ${{ steps.declaration-a11y.outputs.url && steps.declaration-a11y.outputs.url != '' }}
if: false
uses: "DISIC/dashlord-observatoire/actions/rgaa@main"
with:
declarationUrl: ${{ steps.declaration-a11y.outputs.url }}
output: scans/rgaa.json
- name: JDMA
continue-on-error: true
if: ${{ matrix.sites.id != '' && matrix.sites.id != null }}
uses: "DISIC/dashlord-observatoire/actions/jdma@main"
with:
id: ${{ matrix.sites.id }}
form_id: ${{ matrix.sites.form_id }}
startDate: ${{ matrix.sites.startDate }}
endDate: ${{ matrix.sites.endDate }}
output: scans/jdma.json
output2: scans/jdma_3months.json
- name: UpDown
continue-on-error: true
uses: "DISIC/dashlord-observatoire/actions/updown@main"
with:
updownToken: ${{ matrix.sites.updownToken }}
updownApiKey: ${{ secrets.UPDOWNIO_API_KEY }}
startDate: ${{ matrix.sites.startDate }}
endDate: ${{ matrix.sites.endDate }}
output: scans/updown.json
# - name: eco-index
# timeout-minutes: 2
# continue-on-error: true
# uses: "socialgouv/dashlord-actions/ecoindex@v1"
# with:
# url: ${{ matrix.sites.link }}
# output: scans/ecoindex.json
# - name: Lighthouse scan
# continue-on-error: true
# timeout-minutes: 10
# uses: SocialGouv/dashlord-actions/lhci@v1
# with:
# url: ${{ matrix.sites.link }}
# - name: Updown.io checks
# continue-on-error: true
# timeout-minutes: 10
# uses: "MTES-MCT/updownio-action@main"
# with:
# apiKey: ${{ secrets.UPDOWNIO_API_KEY }}
# url: ${{ matrix.sites.link }}
# output: scans/updownio.json
- uses: DISIC/dashlord-observatoire/actions/save@main
with:
id: ${{ matrix.sites.id }}
url: ${{ matrix.sites.link }}
- uses: EndBug/add-and-commit@v9
with:
add: "results"
author_name: ${{ secrets.SOCIALGROOVYBOT_NAME }}
author_email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }}
message: "update: ${{ matrix.sites.link }}"
pull: "--rebase --autostash"