|
7 | 7 | - stable
|
8 | 8 | - staging
|
9 | 9 | release:
|
10 |
| - types: [ published ] |
11 |
| - |
| 10 | + types: [published] |
12 | 11 |
|
13 | 12 | jobs:
|
14 | 13 | test:
|
15 | 14 | runs-on: ${{ matrix.os }}
|
16 | 15 | strategy:
|
17 | 16 | matrix:
|
18 | 17 | os: [ubuntu-latest]
|
19 |
| - python-version: ["3.8","3.9","3.10","3.11"] |
| 18 | + python-version: ["3.9", "3.10", "3.11"] |
20 | 19 | steps:
|
21 |
| - - uses: actions/checkout@v2 |
22 |
| - - name: Set up Python ${{ matrix.python-version }} |
23 |
| - uses: actions/setup-python@v2 |
24 |
| - with: |
25 |
| - python-version: ${{ matrix.python-version }} |
26 |
| - - name: Install dependencies |
27 |
| - run: | |
28 |
| - python -m pip install --upgrade pip |
29 |
| - python -m pip install setuptools poetry |
30 |
| - poetry install -E dev -E image |
31 |
| - - name: Install dependencies OSX |
32 |
| - run: | |
33 |
| - if [ "$RUNNER_OS" == "macOS" ]; then |
34 |
| - brew install libomp; |
35 |
| - fi |
36 |
| - shell: bash |
37 |
| - env: |
38 |
| - CHECK_FOR_UPDATES: False |
39 |
| - - name: Lint with flake8 |
40 |
| - run: | |
41 |
| - poetry run python -m flake8 . |
42 |
| - - name: Test with unittest |
43 |
| - run: | |
44 |
| - # Run all the "standard" tests |
45 |
| - poetry run python -m unittest discover tests |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - name: Set up Python ${{ matrix.python-version }} |
| 22 | + uses: actions/setup-python@v2 |
| 23 | + with: |
| 24 | + python-version: ${{ matrix.python-version }} |
| 25 | + - name: Install dependencies |
| 26 | + run: | |
| 27 | + python -m pip install --upgrade pip |
| 28 | + python -m pip install setuptools poetry |
| 29 | + poetry install -E dev -E image |
| 30 | + - name: Install dependencies OSX |
| 31 | + run: | |
| 32 | + if [ "$RUNNER_OS" == "macOS" ]; then |
| 33 | + brew install libomp; |
| 34 | + fi |
| 35 | + shell: bash |
| 36 | + env: |
| 37 | + CHECK_FOR_UPDATES: False |
| 38 | + - name: Lint with flake8 |
| 39 | + run: | |
| 40 | + poetry run python -m flake8 . |
| 41 | + - name: Test with unittest |
| 42 | + run: | |
| 43 | + # Run all the "standard" tests |
| 44 | + poetry run python -m unittest discover tests |
46 | 45 |
|
47 | 46 | deploy:
|
48 | 47 | runs-on: ubuntu-latest
|
49 | 48 | environment: PublishCI
|
50 | 49 | needs: test
|
51 | 50 | if: github.ref == 'refs/heads/stable' || github.event_name == 'release'
|
52 | 51 | steps:
|
53 |
| - - uses: actions/checkout@v2 |
54 |
| - - name: Set up Python |
55 |
| - uses: actions/setup-python@v2 |
56 |
| - with: |
57 |
| - python-version: '3.8' |
58 |
| - - name: Install dependencies |
59 |
| - run: | |
60 |
| - python -m pip install --upgrade pip |
61 |
| - pip install poetry |
62 |
| - - name: Build |
63 |
| - run: poetry build |
64 |
| - - name: Publish |
65 |
| - env: |
66 |
| - POETRY_HTTP_BASIC_PYPI_USERNAME: __token__ |
67 |
| - POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
68 |
| - run: | |
69 |
| - poetry publish --dry-run |
70 |
| - poetry publish |
| 52 | + - uses: actions/checkout@v2 |
| 53 | + - name: Set up Python |
| 54 | + uses: actions/setup-python@v2 |
| 55 | + with: |
| 56 | + python-version: "3.10" |
| 57 | + - name: Install dependencies |
| 58 | + run: | |
| 59 | + python -m pip install --upgrade pip |
| 60 | + pip install poetry |
| 61 | + - name: Build |
| 62 | + run: poetry build |
| 63 | + - name: Publish |
| 64 | + env: |
| 65 | + POETRY_HTTP_BASIC_PYPI_USERNAME: __token__ |
| 66 | + POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 67 | + run: | |
| 68 | + poetry publish --dry-run |
| 69 | + poetry publish |
0 commit comments