forked from dr-leo/pandaSDMX
-
Notifications
You must be signed in to change notification settings - Fork 19
146 lines (121 loc) · 3.26 KB
/
sources.yaml
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
135
136
137
138
139
140
141
142
143
144
145
146
name: Test data sources
on:
push:
branches: [ main ]
# Uncomment to test changes on a PR branch
# pull_request:
# branches: [ main ]
schedule: # 05:00 UTC = 06:00 CET = 07:00 CEST
- cron: "0 5 * * *"
# Cancel previous runs that have not completed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
source:
runs-on: ubuntu-latest
strategy:
matrix:
source:
- ABS
- ABS_JSON
- BBK
- BIS
- COMP
- ECB
- EMPL
- ESTAT
- ESTAT3
- ESTAT_COMEXT
- GROW
- ILO
- IMF
- INEGI
- INSEE
- ISTAT
- LSD
- NB
- NBB
- OECD
- OECD_JSON
- SGR
- SPC
- STAT_EE
- UNESCO
- UNICEF
- UNSD
- WB
- WB_WDI
name: ${{ matrix.source }}
steps:
- uses: actions/checkout@v4
# TODO avoid requiring this; it's not used in this workflow
- name: Checkout test data
uses: actions/checkout@v4
with:
repository: khaeru/sdmx-test-data
path: sdmx-test-data
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
cache-dependency-path: "**/pyproject.toml"
- name: Install the Python package and dependencies
run: pip install .[cache,tests] pytest-regex
- name: Tests of ${{ matrix.source }} data source
continue-on-error: true
env:
SDMX_TEST_DATA: ./sdmx-test-data/
run: |
pytest -m network --regex '.*Test${{ matrix.source }}:' \
--color=yes --durations=30 -rA --verbose \
--cov-report=xml \
--numprocesses=auto
- name: Upload ${{ matrix.source }} results as a build artifact
uses: actions/upload-artifact@v4
with:
name: source-tests-${{ matrix.source }}
path: source-tests/*.json
compression-level: 1
- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v4
with: { token: "${{ secrets.CODECOV_TOKEN }}" }
collect:
needs: source
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
cache-dependency-path: "**/pyproject.toml"
- name: Install the Python package and dependencies
run: pip install .[cache,tests]
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: source-tests
pattern: source-tests-*
merge-multiple: true
- name: Compile report
run: python -m sdmx.testing.report
- name: Upload report as a pages artifact
uses: actions/upload-pages-artifact@v3
with: { path: source-tests }
# This job is as described at https://github.com/actions/deploy-pages
deploy:
needs: collect
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
# Specify runner + deployment step
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# Deploy to the gh-pages environment
environment:
name: gh-pages
url: ${{ steps.deployment.outputs.page_url }}