forked from AysherInc/Arelle
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (127 loc) · 4.62 KB
/
conformance-suites.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
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: Run Xbrl Conformance Suites
on: pull_request_target
jobs:
find-tests:
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.build-test-matrix.outputs.matrix }}
steps:
- uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- id: build-test-matrix
run: |
printf matrix= >> $GITHUB_OUTPUT
basename -s .py tests/integration_tests/validation/conformance_suite_configurations/*.py | grep -v '^efm' | jq -Rsc 'split("\n") | map(select(length > 0))' | tee -a $GITHUB_OUTPUT
run-conformance-suite:
name: ${{ matrix.test }} - ${{ matrix.os }} - ${{ matrix.python-version }}
needs: find-tests
permissions: read-all
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
python-version:
- '3.11'
test: ${{ fromJson(needs.find-tests.outputs.matrix) }}
include:
- os: windows-2022
python-version: '3.7'
test: xbrl_2_1
- os: macos-12
python-version: '3.7'
test: xbrl_2_1
- os: ubuntu-22.04
python-version: '3.7'
test: xbrl_2_1
- os: windows-2022
python-version: '3.8'
test: xbrl_2_1
- os: macos-12
python-version: '3.8'
test: xbrl_2_1
- os: ubuntu-22.04
python-version: '3.8'
test: xbrl_2_1
- os: windows-2022
python-version: '3.9'
test: xbrl_2_1
- os: macos-12
python-version: '3.9'
test: xbrl_2_1
- os: ubuntu-22.04
python-version: '3.9'
test: xbrl_2_1
- os: windows-2022
python-version: '3.10'
test: xbrl_2_1
- os: macos-12
python-version: '3.10'
test: xbrl_2_1
- os: ubuntu-22.04
python-version: '3.10'
test: xbrl_2_1
- os: windows-2022
python-version: '3.11'
test: xbrl_2_1
- os: macos-12
python-version: '3.11'
test: xbrl_2_1
environment: integration-tests
steps:
- name: Download XBRL validation config
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
mkdir -p "$XDG_CONFIG_HOME/arelle/cache"
curl -L "${{ secrets.XBRL_VALIDATION_CONFIG_URL }}" -o config.zip
unzip -d "$XDG_CONFIG_HOME/arelle/cache" config.zip 'http/*' 'https/*'
rm config.zip
- name: Download XBRL validation config
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
mkdir -p ~/Library/Caches/Arelle
curl -L "${{ secrets.XBRL_VALIDATION_CONFIG_URL }}" -o config.zip
unzip -d ~/Library/Caches/Arelle config.zip 'http/*' 'https/*'
rm config.zip
- name: Download XBRL validation config
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
mkdir -p $env:LOCALAPPDATA\Arelle\cache
curl "${{ secrets.XBRL_VALIDATION_CONFIG_URL }}" -o config.zip
7z x config.zip -o"$env:LOCALAPPDATA\Arelle\cache" 'http/*' 'https/*'
rm config.zip
- uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Checkout EdgarRenderer
if: ${{ matrix.test == 'efm_current' }}
uses: actions/[email protected]
with:
repository: Arelle/EdgarRenderer
path: arelle/plugin/EdgarRenderer
- name: Install Python 3
uses: actions/[email protected]
with:
cache: 'pip'
check-latest: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements-dev.txt
- name: Configure AWS Credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: us-east-1
- name: Download from S3
run: aws s3 sync s3://arelle tests/resources
- name: Run integration tests with pytest
run: pytest -s --disable-warnings --offline --name ${{ matrix.test }} tests/integration_tests/validation/test_conformance_suites.py