|
6 | 6 | pull_request:
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - build: |
10 |
| - if: "!contains(github.event.head_commit.message, 'skip-ci')" |
| 9 | + pre-build: |
11 | 10 | runs-on: ubuntu-latest
|
12 | 11 | strategy:
|
13 | 12 | matrix:
|
14 |
| - python-version: ["3.10", "3.9", "3.8", "3.7"] |
| 13 | + python-version: ["3.11"] |
15 | 14 | steps:
|
16 | 15 | - uses: actions/checkout@v3
|
17 | 16 |
|
18 | 17 | - name: Install poetry
|
19 | 18 | run: pipx install poetry
|
20 | 19 |
|
21 |
| - - uses: actions/setup-python@v3 |
| 20 | + - uses: actions/setup-python@v4 |
22 | 21 | with:
|
23 | 22 | python-version: ${{ matrix.python-version }}
|
24 | 23 | cache: poetry
|
25 | 24 |
|
| 25 | + - name: Check poetry.lock |
| 26 | + run: | |
| 27 | + poetry env use ${{ matrix.python-version }} |
| 28 | + poetry lock --check |
| 29 | +
|
26 | 30 | - name: Install dependencies
|
27 | 31 | run: |
|
28 | 32 | poetry env use ${{ matrix.python-version }}
|
29 |
| - poetry install --no-ansi --no-root --no-interaction --only build |
30 |
| - poetry run pip install -r tests/requirements.txt |
| 33 | + poetry install --no-root --only build --no-ansi --no-interaction |
| 34 | + poetry run pip install -c tests/pip-constraints.txt . |
31 | 35 |
|
32 | 36 | - name: Lint
|
33 | 37 | run: poetry run poe lint
|
34 | 38 |
|
35 | 39 | - name: Test Coverage
|
36 |
| - run: poetry run coverage run |
| 40 | + run: poetry run poe test-cov |
37 | 41 |
|
38 |
| - - name: Coveralls.io notification |
39 |
| - uses: miurahr/coveralls-python-action@b5f4b04e702438c3f7eceb03acf0f3c60dbe252e |
| 42 | + - name: Coveralls Parallel |
| 43 | + uses: coverallsapp/github-action@master |
40 | 44 | with:
|
| 45 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 46 | + flag-name: run-${{ matrix.python-version }} |
41 | 47 | parallel: true
|
42 |
| - flag-name: Unit Test |
43 | 48 |
|
44 |
| - coveralls_finish: |
45 |
| - needs: build |
| 49 | + - name: Upload pages artifact |
| 50 | + uses: actions/upload-pages-artifact@v1 |
| 51 | + if: github.event_name == 'push' && github.ref_name == 'master' && github.repository_owner == 'monim67' |
| 52 | + with: |
| 53 | + path: ./pages |
| 54 | + |
| 55 | + build: |
46 | 56 | runs-on: ubuntu-latest
|
| 57 | + needs: pre-build |
| 58 | + strategy: |
| 59 | + matrix: |
| 60 | + python-version: ["3.10", "3.9", "3.8", "3.7"] |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v3 |
| 63 | + |
| 64 | + - name: Install poetry |
| 65 | + run: pipx install poetry |
| 66 | + |
| 67 | + - uses: actions/setup-python@v4 |
| 68 | + with: |
| 69 | + python-version: ${{ matrix.python-version }} |
| 70 | + cache: poetry |
| 71 | + |
| 72 | + - name: Install dependencies |
| 73 | + run: | |
| 74 | + poetry env use ${{ matrix.python-version }} |
| 75 | + poetry install --no-root --only build --no-ansi --no-interaction |
| 76 | + poetry run pip install -c tests/pip-constraints.txt . |
| 77 | +
|
| 78 | + - name: Test Coverage |
| 79 | + run: poetry run poe test-cov |
| 80 | + |
| 81 | + - name: Coveralls Parallel |
| 82 | + uses: coverallsapp/github-action@master |
| 83 | + with: |
| 84 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 85 | + flag-name: run-${{ matrix.python-version }} |
| 86 | + parallel: true |
| 87 | + |
| 88 | + coveralls: |
| 89 | + runs-on: ubuntu-latest |
| 90 | + needs: build |
47 | 91 | steps:
|
48 | 92 | - name: Coveralls Finished
|
49 |
| - uses: miurahr/coveralls-python-action@b5f4b04e702438c3f7eceb03acf0f3c60dbe252e |
| 93 | + uses: coverallsapp/github-action@master |
50 | 94 | with:
|
| 95 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
51 | 96 | parallel-finished: true
|
| 97 | + |
| 98 | + deploy-pages: |
| 99 | + runs-on: ubuntu-latest |
| 100 | + needs: build |
| 101 | + if: github.event_name == 'push' && github.ref_name == 'master' && github.repository_owner == 'monim67' |
| 102 | + permissions: |
| 103 | + contents: read |
| 104 | + pages: write |
| 105 | + id-token: write |
| 106 | + environment: |
| 107 | + name: github-pages |
| 108 | + url: ${{ steps.deployment.outputs.page_url }} |
| 109 | + steps: |
| 110 | + - name: Deploy to GitHub Pages |
| 111 | + id: deployment |
| 112 | + uses: actions/deploy-pages@v1 |
0 commit comments