|
1 |
| -name: CI-CD |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - master
|
7 | 7 | - devel
|
8 |
| - tags: |
9 |
| - - '[0-9]+.[0-9]+.[0-9]+' |
10 |
| - - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' |
11 | 8 | pull_request:
|
12 | 9 | branches:
|
13 | 10 | - master
|
14 | 11 | - devel
|
15 | 12 |
|
16 | 13 | jobs:
|
17 |
| - test: |
18 |
| - runs-on: ${{ matrix.os }} |
19 |
| - strategy: |
20 |
| - fail-fast: false |
21 |
| - matrix: |
22 |
| - os: [ubuntu-latest, macos-13, windows-latest] |
23 |
| - python-version: ["3.8", "3.9", "3.10", "3.11"] |
24 |
| - |
25 |
| - steps: |
26 |
| - - uses: actions/checkout@v2 |
27 |
| - - name: Set up Python ${{ matrix.python-version }} |
28 |
| - uses: actions/setup-python@v2 |
29 |
| - with: |
30 |
| - python-version: ${{ matrix.python-version }} |
31 |
| - - name: Install dependencies |
32 |
| - run: | |
33 |
| - python -m pip install --upgrade pip setuptools wheel |
34 |
| - python -m pip install tox tox-gh-actions |
35 |
| - - name: Test with tox |
36 |
| - run: tox -- --cover-xml |
37 |
| - env: |
38 |
| - CI: true |
39 |
| - - name: Report coverage |
40 |
| - shell: bash |
41 |
| - run: bash <(curl -s https://codecov.io/bash) |
42 |
| - |
43 |
| - release: |
44 |
| - needs: test |
45 |
| - if: startsWith(github.ref, 'refs/tags') |
46 |
| - runs-on: ${{ matrix.os }} |
47 |
| - strategy: |
48 |
| - matrix: |
49 |
| - os: [ubuntu-latest] |
50 |
| - python-version: [3.8] |
51 |
| - |
52 |
| - steps: |
53 |
| - - uses: actions/checkout@v2 |
54 |
| - - name: Set up Python ${{ matrix.python-version }} |
55 |
| - uses: actions/setup-python@v2 |
56 |
| - with: |
57 |
| - python-version: ${{ matrix.python-version }} |
58 |
| - - name: Get tag |
59 |
| - id: tag |
60 |
| - run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" |
61 |
| - - name: Install dependencies |
62 |
| - run: | |
63 |
| - python -m pip install --upgrade pip setuptools wheel |
64 |
| - python -m pip install twine |
65 |
| - - name: Build package |
66 |
| - run: python setup.py sdist bdist_wheel |
67 |
| - - name: Check the package |
68 |
| - run: twine check dist/* |
69 |
| - - name: Publish to PyPI |
70 |
| - env: |
71 |
| - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
72 |
| - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
73 |
| - run: |
74 |
| - twine upload --skip-existing --non-interactive dist/* |
75 |
| - - name: Create GitHub release |
76 |
| - uses: actions/create-release@v1 |
77 |
| - env: |
78 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
79 |
| - with: |
80 |
| - tag_name: ${{ github.ref }} |
81 |
| - release_name: ${{ github.ref }} |
82 |
| - body: > |
83 |
| - Please see |
84 |
| - https://github.com/${{ github.repository }}/blob/${{ steps.tag.outputs.version }}/CHANGELOG.rst |
85 |
| - for the full release notes. |
86 |
| - draft: false |
87 |
| - prerelease: false |
| 14 | + prerequisites: |
| 15 | + uses: ./.github/workflows/test.yml |
0 commit comments