-
Notifications
You must be signed in to change notification settings - Fork 53
65 lines (60 loc) · 2.16 KB
/
validate.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Validate
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ data , actions ]
pull_request:
branches: [ main , data, main_test ]
types: [opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Changes:
runs-on: ubuntu-latest
outputs:
parla_process: '${{ steps.detect-changes.outputs.parla_process }}'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout ParlaMint
uses: actions/checkout@v3
with:
path: ParlaMint
fetch-depth: 2 # when called a pull_request - test is run on test merge -> full history is not needed to detect changes
- name: Setup # initialize dependencies cache - used in next steps
uses: ./ParlaMint/.github/actions/ParlaMintEnvSetup
- name: ParlaMint status (Detect changed files and get list of parliaments that should be processed)
id: detect-changes
uses: ./ParlaMint/.github/actions/ParlaMintStatus
- name: Test total TEI file size limit
if: ${{ steps.detect-changes.outputs.parla_changed_size > 100 }}
run: |
echo "::error::100MB file limit has been exceed"
exit 1
ValidateCountries:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: Changes
strategy:
matrix:
parla: ${{ fromJSON(needs.Changes.outputs.parla_process) }}
fail-fast: false
steps:
- name: Checkout ParlaMint
uses: actions/checkout@v3
with:
path: ParlaMint
- name: Setup
uses: ./ParlaMint/.github/actions/ParlaMintEnvSetup
with:
parla: ${{matrix.parla}}
- name: Validate ParlaMint-${{matrix.parla}}
uses: ./ParlaMint/.github/actions/ParlaMintValidate
with:
parlas: '["${{matrix.parla}}"]'
Validate:
runs-on: ubuntu-latest
needs: [ValidateCountries]
steps:
- run: echo Done!