|
8 | 8 | strategy:
|
9 | 9 | matrix:
|
10 | 10 | os: [macOS-latest, ubuntu-22.04, windows-latest]
|
11 |
| - python-version: [3.9, '3.10', 3.11] |
| 11 | + python-version: [3.9, "3.10", 3.11, 3.12] |
12 | 12 | fail-fast: false
|
13 | 13 | runs-on: ${{ matrix.os }}
|
14 | 14 | steps:
|
15 |
| - - uses: actions/checkout@v1 |
16 |
| - with: |
17 |
| - submodules: true |
18 |
| - - name: Environment Variables |
19 |
| - run: | |
20 |
| - echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV |
21 |
| - echo "CI_PACKAGE=colour_demosaicing" >> $GITHUB_ENV |
22 |
| - echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV |
23 |
| - echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV |
24 |
| - shell: bash |
25 |
| - - name: Set up Python 3.9 for Pre-Commit |
26 |
| - uses: actions/setup-python@v1 |
27 |
| - with: |
28 |
| - python-version: 3.9 |
29 |
| - - name: Set up Python ${{ matrix.python-version }} |
30 |
| - uses: actions/setup-python@v1 |
31 |
| - with: |
32 |
| - python-version: ${{ matrix.python-version }} |
33 |
| - - name: Install Poetry |
34 |
| - env: |
35 |
| - POETRY_VERSION: 1.4.0 |
36 |
| - run: | |
37 |
| - curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - |
38 |
| - echo "$HOME/.poetry/bin" >> $GITHUB_PATH |
39 |
| - shell: bash |
40 |
| - - name: Install Package Dependencies |
41 |
| - run: | |
42 |
| - poetry run python -m pip install --upgrade pip |
43 |
| - poetry install |
44 |
| - poetry run python -c "import imageio;imageio.plugins.freeimage.download()" |
45 |
| - shell: bash |
46 |
| - - name: Pre-Commit (All Files) |
47 |
| - run: | |
48 |
| - poetry run pre-commit run --all-files |
49 |
| - shell: bash |
50 |
| - - name: Test Optimised Python Execution |
51 |
| - run: | |
52 |
| - poetry run python -OO -c "import $CI_PACKAGE" |
53 |
| - shell: bash |
54 |
| - - name: Test with Pytest |
55 |
| - run: | |
56 |
| - poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE |
57 |
| - shell: bash |
58 |
| - - name: Upload Coverage to coveralls.io |
59 |
| - if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11' |
60 |
| - run: | |
61 |
| - if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi |
62 |
| - shell: bash |
| 15 | + - uses: actions/checkout@v1 |
| 16 | + with: |
| 17 | + submodules: true |
| 18 | + - name: Environment Variables |
| 19 | + run: | |
| 20 | + echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV |
| 21 | + echo "CI_PACKAGE=colour_demosaicing" >> $GITHUB_ENV |
| 22 | + echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV |
| 23 | + echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV |
| 24 | + shell: bash |
| 25 | + - name: Set up Python 3.9 for Pre-Commit |
| 26 | + uses: actions/setup-python@v4 |
| 27 | + with: |
| 28 | + python-version: 3.9 |
| 29 | + - name: Set up Python ${{ matrix.python-version }} |
| 30 | + uses: actions/setup-python@v4 |
| 31 | + with: |
| 32 | + python-version: ${{ matrix.python-version }} |
| 33 | + - name: Install Poetry |
| 34 | + env: |
| 35 | + POETRY_VERSION: 1.4.0 |
| 36 | + run: | |
| 37 | + curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - |
| 38 | + echo "$HOME/.poetry/bin" >> $GITHUB_PATH |
| 39 | + shell: bash |
| 40 | + - name: Install Package Dependencies |
| 41 | + run: | |
| 42 | + poetry run python -m pip install --upgrade pip |
| 43 | + poetry install |
| 44 | + poetry run python -c "import imageio;imageio.plugins.freeimage.download()" |
| 45 | + shell: bash |
| 46 | + - name: Pre-Commit (All Files) |
| 47 | + run: | |
| 48 | + poetry run pre-commit run --all-files |
| 49 | + shell: bash |
| 50 | + - name: Test Optimised Python Execution |
| 51 | + run: | |
| 52 | + poetry run python -OO -c "import $CI_PACKAGE" |
| 53 | + shell: bash |
| 54 | + - name: Test with Pytest |
| 55 | + run: | |
| 56 | + poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE |
| 57 | + shell: bash |
| 58 | + - name: Upload Coverage to coveralls.io |
| 59 | + if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11' |
| 60 | + run: | |
| 61 | + if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi |
| 62 | + shell: bash |
0 commit comments