-
Notifications
You must be signed in to change notification settings - Fork 9
62 lines (52 loc) · 1.74 KB
/
run-unit-tests.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
name: "[Py3.8][Py3.9][Py3.10] OCIFS Tests"
on:
workflow_dispatch:
pull_request:
paths:
- "ocifs/**"
- "pyproject.toml"
- ".github/workflows/run-unit-tests.yml"
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
jobs:
test:
name: python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8","3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
pyproject.toml
"test-requirements.txt"
- uses: ./.github/workflows/set-dummy-conf
name: "Test config setup"
- name: "Run Operators Tests"
timeout-minutes: 60
shell: bash
run: |
set -x # print commands that are executed
$CONDA/bin/conda init
source /home/runner/.bashrc
python3 -m pip install -r test-requirements.txt
echo ${{ env.OCI__OCIFS_TEST_BUCKET }}
echo ${{ env.OCIFS_TEST_BUCKET }}
export OCIFS_TEST_BUCKET="ocifs-test"
export OCIFS_IAM_TYPE="instance_principal"
echo ${{ env.OCIFS_TEST_BUCKET }}
python -m pytest -v -p no:warnings --durations=5 ocifs/tests/test_integration.py