|
1 | 1 | name: CI
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: |
6 |
| - - main |
7 |
| - pull_request: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
8 | 8 |
|
9 | 9 | concurrency:
|
10 |
| - group: ${{ github.head_ref || github.run_id }} |
11 |
| - cancel-in-progress: true |
| 10 | + group: ${{ github.head_ref || github.run_id }} |
| 11 | + cancel-in-progress: true |
12 | 12 |
|
13 | 13 | jobs:
|
14 |
| - # Make sure commit messages follow the conventional commits convention: |
15 |
| - # https://www.conventionalcommits.org |
16 |
| - commitlint: |
17 |
| - name: Lint Commit Messages |
18 |
| - runs-on: ubuntu-latest |
19 |
| - steps: |
20 |
| - - uses: actions/checkout@v3 |
21 |
| - with: |
22 |
| - fetch-depth: 0 |
23 |
| - |
24 |
| - lint: |
25 |
| - runs-on: ubuntu-latest |
26 |
| - steps: |
27 |
| - - uses: actions/checkout@v3 |
28 |
| - - uses: actions/setup-python@v4 |
29 |
| - with: |
30 |
| - python-version: "3.10" |
31 |
| - - uses: pre-commit/[email protected] |
| 14 | + # Make sure commit messages follow the conventional commits convention: |
| 15 | + # https://www.conventionalcommits.org |
| 16 | + commitlint: |
| 17 | + name: Lint Commit Messages |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v3 |
| 21 | + with: |
| 22 | + fetch-depth: 0 |
| 23 | + |
| 24 | + lint: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v3 |
| 28 | + - uses: actions/setup-python@v4 |
| 29 | + with: |
| 30 | + python-version: "3.10" |
| 31 | + - uses: pre-commit/[email protected] |
32 | 32 |
|
33 |
| - test: |
34 |
| - strategy: |
35 |
| - fail-fast: false |
36 |
| - matrix: |
37 |
| - python-version: |
38 |
| - - "3.10" |
39 |
| - - "3.11" |
40 |
| - os: |
41 |
| - - ubuntu-latest |
42 |
| - - windows-latest |
43 |
| - - macOS-latest |
44 |
| - runs-on: ${{ matrix.os }} |
45 |
| - steps: |
46 |
| - - uses: actions/checkout@v3 |
47 |
| - - name: Set up Python |
48 |
| - uses: actions/setup-python@v4 |
49 |
| - with: |
50 |
| - python-version: ${{ matrix.python-version }} |
51 |
| - |
52 |
| - - name: Install Dependencies |
53 |
| - run: poetry install |
54 |
| - shell: bash |
55 |
| - - name: Test with Pytest |
56 |
| - run: poetry run pytest |
57 |
| - shell: bash |
58 |
| - release: |
59 |
| - runs-on: ubuntu-latest |
60 |
| - environment: release |
61 |
| - if: github.ref == 'refs/heads/main' |
62 |
| - needs: |
63 |
| - - test |
| 33 | + test: |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + matrix: |
| 37 | + python-version: |
| 38 | + - "3.10" |
| 39 | + - "3.11" |
| 40 | + os: |
| 41 | + - ubuntu-latest |
| 42 | + - windows-latest |
| 43 | + - macOS-latest |
| 44 | + runs-on: ${{ matrix.os }} |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v3 |
| 47 | + - name: Set up Python |
| 48 | + uses: actions/setup-python@v4 |
| 49 | + with: |
| 50 | + python-version: ${{ matrix.python-version }} |
| 51 | + |
| 52 | + - name: Install Dependencies |
| 53 | + run: poetry install |
| 54 | + shell: bash |
| 55 | + - name: Test with Pytest |
| 56 | + run: poetry run pytest |
| 57 | + shell: bash |
| 58 | + release: |
| 59 | + runs-on: ubuntu-latest |
| 60 | + environment: release |
| 61 | + if: github.ref == 'refs/heads/main' |
| 62 | + needs: |
| 63 | + - test |
64 | 64 |
|
65 |
| - steps: |
66 |
| - - uses: actions/checkout@v3 |
67 |
| - with: |
68 |
| - fetch-depth: 0 |
69 |
| - persist-credentials: false |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v3 |
| 67 | + with: |
| 68 | + fetch-depth: 0 |
| 69 | + persist-credentials: false |
70 | 70 |
|
71 |
| - # Run semantic release: |
72 |
| - # - Update CHANGELOG.md |
73 |
| - # - Update version in code |
74 |
| - # - Create git tag |
75 |
| - # - Create GitHub release |
76 |
| - # - Publish to PyPI |
77 |
| - - name: Python Semantic Release |
78 |
| - |
79 |
| - with: |
80 |
| - github_token: ${{ secrets.GH_TOKEN }} |
81 |
| - repository_username: __token__ |
82 |
| - repository_password: ${{ secrets.PYPI_TOKEN }} |
| 71 | + # Run semantic release: |
| 72 | + # - Update CHANGELOG.md |
| 73 | + # - Update version in code |
| 74 | + # - Create git tag |
| 75 | + # - Create GitHub release |
| 76 | + # - Publish to PyPI |
| 77 | + - name: Python Semantic Release |
| 78 | + |
| 79 | + with: |
| 80 | + github_token: ${{ secrets.GH_TOKEN }} |
| 81 | + repository_username: __token__ |
| 82 | + repository_password: ${{ secrets.PYPI_TOKEN }} |
0 commit comments