1- name : tests/unitary/**
1+ name : " [Py3.8][COV REPORT] tests/unitary/**"
22
33on :
44 workflow_dispatch :
55 pull_request :
6- branches :
7- - main
8- - " release/**"
9- - develop
106 paths :
117 - " ads/**"
128 - pyproject.toml
139 - " **requirements.txt"
14- - .github/workflows/run-unittests.yml
15- - .github/workflows/run-unittests-default_setup.yml
10+ - " .github/workflows/run-unittests*.yml"
1611
1712# Cancel in progress workflows on pull_requests.
1813# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
3025
3126jobs :
3227 test :
33- name : python ${{ matrix.python-version }} , ${{ matrix.name }}
28+ name : python 3.8 , ${{ matrix.name }}
3429 runs-on : ubuntu-latest
3530 timeout-minutes : 90
3631
3732 strategy :
3833 fail-fast : false
3934 matrix :
40- python-version : ["3.8", "3.9", "3.10"]
4135 test-path : ["tests/unitary/with_extras tests/unitary/default_setup", "tests/unitary/with_extras/model"]
4236 include :
4337 - test-path : " tests/unitary/with_extras tests/unitary/default_setup"
4438 ignore-path : " --ignore tests/unitary/with_extras/model --ignore tests/unitary/with_extras/feature_store"
4539 name : " unitary"
4640 - test-path : " tests/unitary/with_extras/model"
4741 name : " model"
48- - python-version : " 3.8"
49- cov-reports : --cov=ads --cov-report=xml --cov-report=html
5042
5143 steps :
5244 - uses : actions/checkout@v3
5345
54- # Caching python libraries installed with pip
55- # https://github.com/actions/cache/blob/main/examples.md#python---pip
56- - uses : actions/cache@v3
57- with :
58- path : ~/.cache/pip
59- key : ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
60- restore-keys : |
61- ${{ runner.os }}-pip-
46+ - uses : ./.github/workflows/create-more-space
47+ name : " Create more disk space"
48+
6249 - uses : actions/setup-python@v4
6350 with :
64- python-version : ${{ matrix.python-version }}
51+ python-version : " 3.8"
52+ cache : " pip"
53+ cache-dependency-path : |
54+ pyproject.toml
55+ "**requirements.txt"
6556
66- - name : " Test config setup"
67- shell : bash
68- env :
69- HOME_RUNNER_DIR : /home/runner
70- run : |
71- set -x # print commands that are executed
72- mkdir -p "$HOME_RUNNER_DIR"/.oci
73- openssl genrsa -out $HOME_RUNNER_DIR/.oci/oci_ads_user.pem 2048
74- cat <<EOT >> "$HOME_RUNNER_DIR/.oci/config"
75- [DEFAULT]
76- user=ocid1.user.oc1..xxx
77- fingerprint=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
78- tenancy=ocid1.tenancy.oc1..xxx
79- region=test_region
80- key_file=$HOME_RUNNER_DIR/.oci/oci_ads_user.pem
81- EOT
82- ls -lha "$HOME_RUNNER_DIR"/.oci
83- echo "Test config file:"
84- cat $HOME_RUNNER_DIR/.oci/config
57+ - uses : ./.github/workflows/set-dummy-conf
58+ name : " Test config setup"
8559
8660 - name : " Test env setup"
8761 timeout-minutes : 20
@@ -104,22 +78,19 @@ jobs:
10478 set -x # print commands that are executed
10579
10680 # Setup project and tests folder for cov reports to not be overwritten by another parallel step
107- if [[ ! -z "${{ matrix.cov-reports }}" ]]; then
108- mkdir -p cov-${{ matrix.name }}
109- cd cov-${{ matrix.name }}
110- ln -s ../tests tests
111- ln -s ../ads ads
112- ln -s ../.coveragerc .coveragerc
113- fi
81+ mkdir -p cov-${{ matrix.name }}
82+ cd cov-${{ matrix.name }}
83+ ln -s ../tests tests
84+ ln -s ../ads ads
85+ ln -s ../.coveragerc .coveragerc
11486
11587 # Run tests
11688 python -m pytest -v -p no:warnings --durations=5 \
117- -n auto --dist loadfile ${{ matrix. cov-reports }} \
89+ -n auto --dist loadfile --cov=ads -- cov-report=xml --cov-report=html \
11890 ${{ matrix.test-path }} ${{ matrix.ignore-path }}
11991
12092 - name : " Save coverage files"
12193 uses : actions/upload-artifact@v3
122- if : ${{ matrix.cov-reports }}
12394 with :
12495 name : cov-reports-${{ matrix.name }}
12596 path : |
@@ -132,7 +103,7 @@ jobs:
132103 runs-on : ubuntu-latest
133104 continue-on-error : true
134105 needs : test
135- if : ${{ success() }} && ${{ github.event.issue.pull_request }}
106+ if : ${{ success() }} && && github.event_name == 'pull_request'
136107 env :
137108 COMPARE_BRANCH : main
138109
0 commit comments