Skip to content

Commit 24203d6

Browse files
authored
554 Separate epidata CI from memilio models CI (#557)
* seperate epidata CI * delete minimal CI
1 parent 4d1af3a commit 24203d6

6 files changed

Lines changed: 156 additions & 315 deletions

File tree

.github/actions/test-py/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ runs:
7272
getcasesestimation --help
7373
getcommutermobility --help
7474
getvaccinationdata --help
75+
gethospitalizationdata --help
7576
fi
7677
- name: Upload coverage reports
7778
uses: actions/upload-artifact@v3
7879
with:
79-
name: test-py-coverage-reports
80+
name: test-py-coverage-reports-${{ inputs.package }}
8081
path: |
81-
pycode/coverage_python.xml
82+
pycode/memilio-${{ inputs.package }}/**/coverage_python.xml
8283
coverage_python
83-
retention-days: 1
84+
retention-days: 7
8485
if-no-files-found: ${{ inputs.coverage == 'ON' && 'error' || 'ignore' }}

.github/actions/test-pylint/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ runs:
3333
- name: Upload Pylint Report
3434
uses: actions/upload-artifact@v3
3535
with:
36-
name: pylint-report
36+
name: pylint-report-${{ inputs.package }}
3737
path: pycode/memilio-${{ inputs.package }}/build_pylint/pylint.html
38-
retention-days: 3
38+
retention-days: 7

.github/workflows/epidata_main.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Epidata-CI
2+
3+
on:
4+
schedule:
5+
- cron: "40 1 * * *"
6+
push:
7+
branches:
8+
- 'main'
9+
tags:
10+
- version-*
11+
paths:
12+
- '**/memilio-epidata/**'
13+
- '.github/**'
14+
pull_request:
15+
types: [opened, reopened, synchronize, ready_for_review]
16+
paths:
17+
- '**/memilio-epidata/**'
18+
- '.github/**'
19+
workflow_dispatch:
20+
21+
jobs:
22+
build-py-epidata:
23+
runs-on: ubuntu-latest
24+
container:
25+
image: quay.io/pypa/manylinux2014_x86_64
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: ./.github/actions/build-py
29+
with:
30+
package: epidata
31+
32+
build-py-plot:
33+
if: github.event.pull_request.draft == false
34+
runs-on: ubuntu-latest
35+
container:
36+
image: quay.io/pypa/manylinux2014_x86_64
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: ./.github/actions/build-py
40+
with:
41+
package: plot
42+
43+
test-py-epidata:
44+
needs: build-py-epidata
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: ./.github/actions/test-py
49+
with:
50+
package: epidata
51+
coverage: ON
52+
53+
test-py-plot:
54+
if: github.event.pull_request.draft == false
55+
needs: [build-py-plot, build-py-epidata]
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v3
59+
- uses: ./.github/actions/test-py
60+
with:
61+
package: plot
62+
coverage: ON
63+
64+
test-pylint-epidata:
65+
needs: build-py-epidata
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v3
69+
- uses: ./.github/actions/test-pylint
70+
with:
71+
package: epidata
72+
73+
test-pylint-plot:
74+
needs: build-py-plot
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v3
78+
- uses: ./.github/actions/test-pylint
79+
with:
80+
package: plot
81+
82+
download-data:
83+
needs: build-py-epidata
84+
runs-on: ubuntu-latest
85+
continue-on-error: true
86+
steps:
87+
- uses: actions/checkout@v3
88+
- name: Install dependencies
89+
run: |
90+
sudo apt-get -qq update
91+
sudo apt-get -qq -y install python3-pip gnupg
92+
python -m pip install --upgrade pip
93+
- name: Download Python Wheels
94+
uses: actions/download-artifact@v3
95+
with:
96+
name: python-wheels-epidata
97+
path: pycode/wheelhouse
98+
- name: Set up Python 3.8
99+
uses: actions/setup-python@v4
100+
with:
101+
python-version: 3.8
102+
- name: Install Python Wheels
103+
run: |
104+
for pkg in `ls pycode/wheelhouse/*cp38*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
105+
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
106+
- name: Dowload Data
107+
run: |
108+
mkdir -p data_dl
109+
getcasedata -o data_dl
110+
getpopuldata -o data_dl
111+
getjhdata -o data_dl
112+
getdividata -o data_dl
113+
getcommutermobility -o data_dl
114+
getvaccinationdata -o data_dl
115+
gethospitalizationdata -o data_dl
116+
- name: Upload Data
117+
uses: actions/upload-artifact@v3
118+
with:
119+
name: data
120+
path: |
121+
data_dl/*.json
122+
data_dl/Germany/*.json
123+
data_dl/Spain/*.json
124+
data_dl/France/*.json
125+
data_dl/Italy*.json
126+
data_dl/SouthKorea/*.json
127+
data_dl/US/*.json
128+
data_dl/China/*.json
129+
retention-days: 1
130+

0 commit comments

Comments
 (0)