|
19 | 19 | default: 'Manual trigger'
|
20 | 20 |
|
21 | 21 | jobs:
|
22 |
| - test-install: |
| 22 | + test-caimira-py311: |
| 23 | + name: Test CAiMIRA with Python 3.11 |
23 | 24 | runs-on: ubuntu-latest
|
24 | 25 | env:
|
25 |
| - PROJECT_ROOT: ./ |
26 |
| - PROJECT_NAME: caimira |
27 |
| - CAIMIRA_TESTS_CALCULATOR_TIMEOUT: 30 |
| 26 | + PROJECT_ROOT: "caimira" |
| 27 | + PY_VERSION: "3.11" |
28 | 28 | steps:
|
29 |
| - - name: Checkout |
30 |
| - uses: actions/checkout@v2 |
| 29 | + - name: Checkout Repository |
| 30 | + uses: actions/checkout@v3 |
31 | 31 |
|
32 |
| - - name: Set up Python 3.9 |
33 |
| - uses: actions/setup-python@v2 |
| 32 | + - name: Set up Python ${{ env.PY_VERSION }} |
| 33 | + uses: actions/setup-python@v4 |
34 | 34 | with:
|
35 |
| - python-version: 3.9 |
| 35 | + python-version: ${{ env.PY_VERSION }} |
36 | 36 |
|
37 |
| - - name: Install dependencies |
| 37 | + - name: Cache pip |
| 38 | + uses: actions/cache@v3 |
| 39 | + with: |
| 40 | + path: ~/.cache/pip |
| 41 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} |
| 42 | + restore-keys: | |
| 43 | + ${{ runner.os }}-pip- |
| 44 | +
|
| 45 | + - name: Install Dependencies |
| 46 | + run: | |
| 47 | + cd ${{ env.PROJECT_ROOT }} |
| 48 | + pip install --upgrade pip |
| 49 | + pip install -e .[test] |
| 50 | +
|
| 51 | + - name: Run Tests |
| 52 | + run: | |
| 53 | + cd caimira |
| 54 | + python -m pytest |
| 55 | +
|
| 56 | + test-cern-caimira-py311: |
| 57 | + name: Test CERN CAiMIRA with Python 3.11 |
| 58 | + runs-on: ubuntu-latest |
| 59 | + if: github.ref != 'refs/heads/live/caimira-test' && !startsWith(github.ref, 'refs/tags/') |
| 60 | + env: |
| 61 | + PROJECT_ROOT: "cern_caimira" |
| 62 | + PY_VERSION: "3.11" |
| 63 | + steps: |
| 64 | + - name: Checkout Repository |
| 65 | + uses: actions/checkout@v3 |
| 66 | + |
| 67 | + - name: Set up Python ${{ env.PY_VERSION }} |
| 68 | + uses: actions/setup-python@v4 |
| 69 | + with: |
| 70 | + python-version: ${{ env.PY_VERSION }} |
| 71 | + |
| 72 | + - name: Cache pip |
| 73 | + uses: actions/cache@v3 |
| 74 | + with: |
| 75 | + path: ~/.cache/pip |
| 76 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} |
| 77 | + restore-keys: | |
| 78 | + ${{ runner.os }}-pip- |
| 79 | +
|
| 80 | + - name: Install Dependencies |
| 81 | + run: | |
| 82 | + cd caimira |
| 83 | + pip install --upgrade pip |
| 84 | + pip install -e .[test] |
| 85 | + cd ../${{ env.PROJECT_ROOT }} |
| 86 | + pip install --upgrade pip |
| 87 | + pip install -e .[test] |
| 88 | +
|
| 89 | + - name: Run Tests |
38 | 90 | run: |
|
39 |
| - python -m pip install ${PROJECT_ROOT}[test] |
| 91 | + cd cern_caimira |
| 92 | + python -m pytest |
| 93 | +
|
| 94 | + test-caimira-py39: |
| 95 | + name: Test CAiMIRA with Python 3.9 |
| 96 | + runs-on: ubuntu-latest |
| 97 | + if: github.ref != 'refs/heads/live/caimira-test' && !startsWith(github.ref, 'refs/tags/') |
| 98 | + env: |
| 99 | + PROJECT_ROOT: "caimira" |
| 100 | + PY_VERSION: "3.9" |
| 101 | + steps: |
| 102 | + - name: Checkout Repository |
| 103 | + uses: actions/checkout@v3 |
| 104 | + |
| 105 | + - name: Set up Python ${{ env.PY_VERSION }} |
| 106 | + uses: actions/setup-python@v4 |
| 107 | + with: |
| 108 | + python-version: ${{ env.PY_VERSION }} |
40 | 109 |
|
41 |
| - - name: Run tests |
| 110 | + - name: Cache pip |
| 111 | + uses: actions/cache@v3 |
| 112 | + with: |
| 113 | + path: ~/.cache/pip |
| 114 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} |
| 115 | + restore-keys: | |
| 116 | + ${{ runner.os }}-pip- |
| 117 | +
|
| 118 | + - name: Install Dependencies |
| 119 | + run: | |
| 120 | + cd ${{ env.PROJECT_ROOT }} |
| 121 | + pip install --upgrade pip |
| 122 | + pip install -e .[test] |
| 123 | +
|
| 124 | + - name: Run Tests |
42 | 125 | run: |
|
43 |
| - mkdir -p ~/not-the-source-dir && cd ~/not-the-source-dir |
44 |
| - python -m pytest --pyargs ${PROJECT_NAME} |
45 |
| - test-dev: |
46 |
| - runs-on: ubuntu-20.04 |
| 126 | + cd caimira |
| 127 | + python -m pytest |
| 128 | +
|
| 129 | + test-cern-caimira-py39: |
| 130 | + name: Test CERN CAiMIRA with Python 3.9 |
| 131 | + runs-on: ubuntu-latest |
| 132 | + if: github.ref != 'refs/heads/live/caimira-test' && !startsWith(github.ref, 'refs/tags/') |
47 | 133 | env:
|
48 |
| - PROJECT_ROOT: ./ |
49 |
| - PROJECT_NAME: caimira |
50 |
| - CAIMIRA_TESTS_CALCULATOR_TIMEOUT: 30 |
| 134 | + PROJECT_ROOT: "cern_caimira" |
| 135 | + PY_VERSION: "3.9" |
51 | 136 | steps:
|
52 |
| - - name: Checkout |
53 |
| - uses: actions/checkout@v2 |
| 137 | + - name: Checkout Repository |
| 138 | + uses: actions/checkout@v3 |
| 139 | + |
| 140 | + - name: Set up Python ${{ env.PY_VERSION }} |
| 141 | + uses: actions/setup-python@v4 |
| 142 | + with: |
| 143 | + python-version: ${{ env.PY_VERSION }} |
54 | 144 |
|
55 |
| - - name: Set up Python 3.9 |
56 |
| - uses: actions/setup-python@v2 |
| 145 | + - name: Cache pip |
| 146 | + uses: actions/cache@v3 |
57 | 147 | with:
|
58 |
| - python-version: 3.9 |
| 148 | + path: ~/.cache/pip |
| 149 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} |
| 150 | + restore-keys: | |
| 151 | + ${{ runner.os }}-pip- |
59 | 152 |
|
60 |
| - - name: Install dependencies |
| 153 | + - name: Install Dependencies |
61 | 154 | run: |
|
62 |
| - python -m pip install -e ${PROJECT_ROOT}[test] |
63 |
| - python -m pip install pytest-cov |
| 155 | + cd caimira |
| 156 | + pip install --upgrade pip |
| 157 | + pip install -e .[test] |
| 158 | + cd ../${{ env.PROJECT_ROOT }} |
| 159 | + pip install --upgrade pip |
| 160 | + pip install -e .[test] |
64 | 161 |
|
65 |
| - - name: Run tests |
| 162 | + - name: Run Tests |
66 | 163 | run: |
|
67 |
| - cd ${PROJECT_ROOT} |
68 |
| - python -m pytest ./${PROJECT_NAME} --cov=${PROJECT_NAME} --junitxml=report.xml |
| 164 | + cd cern_caimira |
| 165 | + python -m pytest |
0 commit comments