-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (57 loc) · 2.17 KB
/
run-all-prod-test-curl.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
# This workflows will download idmtools nightly packages from staging artifactory then
# install emodpy, then run tests with curl command
#
# curl command from your cmd:
# curl -XPOST -u "username:githubPAT" -H "Accept: application/vnd.github.everest-preview+json" \
# -H "Content-Type: application/json" \
# --data "{\"event_type\": \"run_emodpy_prod_test\"}" \
# https://api.github.com/repos/InstituteforDiseaseModeling/emodpy/dispatches
#
name: "prod_packages_all_tests"
on:
repository_dispatch:
# Manually trigger with curl or Postman POST
types: [run_emodpy_prod_test]
jobs:
run-all-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: ${{ matrix.os }} Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install py-make flake8 black
- name: Install dataclass
if: ${{ matrix.python-version }} == 3.6
run: |
pip install dataclasses
- name: install idmtools[idm] and idmtools-test from jfrog
run: |
pip install idmtools[idm] --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
pip install idmtools-test --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
- name: login to comps2
run: |
python .dev_scripts/create_auth_token_args.py --username ${{ secrets.COMPS_USER }} --password ${{ secrets.COMPS_PASSWORD }}
env:
COMPS_USER: ${{ secrets.COMPS_USER }}
COMPS_PASSWORD: ${{ secrets.COMPS_PASSWORD }}
- name: run tests
run: |
cd tests
py.test --durations=3 -v --junitxml=test_results.xml
- name: Upload emodpy test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: emodpy_test_results
path: tests/test_results.xml