Split CI by function #4
							
								
								
									
										44
									
								
								.github/workflows/ci-branch-main.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								.github/workflows/ci-branch-main.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					name: CI
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - "main"
 | 
				
			||||||
 | 
					    paths-ignore:
 | 
				
			||||||
 | 
					      - 'README.md'
 | 
				
			||||||
 | 
					      - 'LICENSE.md'
 | 
				
			||||||
 | 
					      - '.gitignore'
 | 
				
			||||||
 | 
					      - 'renovate.json'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  build:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Check out repository code
 | 
				
			||||||
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Setup Python 3.10
 | 
				
			||||||
 | 
					        uses: actions/setup-python@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: "3.10"
 | 
				
			||||||
 | 
					      # - name: Install dependencies
 | 
				
			||||||
 | 
					      #   run: pip install -r requirements.txt && pip install -r requirements-dev.txt
 | 
				
			||||||
 | 
					      - name: Install build dependencies
 | 
				
			||||||
 | 
					        run: pip install setuptools wheel
 | 
				
			||||||
 | 
					      - name: Build wheel file
 | 
				
			||||||
 | 
					        run: python setup.py bdist_wheel
 | 
				
			||||||
 | 
					      - id: skip_check
 | 
				
			||||||
 | 
					        uses: actions/upload-artifact@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          name: whl
 | 
				
			||||||
 | 
					          path: dist/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  publish:
 | 
				
			||||||
 | 
					    needs: build
 | 
				
			||||||
 | 
					    if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Publish to PyPI
 | 
				
			||||||
 | 
					        uses: pypa/gh-action-pypi-publish@release/v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          user: __token__
 | 
				
			||||||
 | 
					          password: ${{ secrets.PYPI_API_TOKEN }}
 | 
				
			||||||
@@ -2,12 +2,13 @@ name: CI
 | 
				
			|||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
  push:
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - '!main'
 | 
				
			||||||
    paths-ignore:
 | 
					    paths-ignore:
 | 
				
			||||||
      - 'README.md'
 | 
					      - 'README.md'
 | 
				
			||||||
      - 'LICENSE.md'
 | 
					      - 'LICENSE.md'
 | 
				
			||||||
      - '.gitignore'
 | 
					      - '.gitignore'
 | 
				
			||||||
      - 'renovate.json'
 | 
					      - 'renovate.json'
 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  skip_duplicate:
 | 
					  skip_duplicate:
 | 
				
			||||||
@@ -92,12 +93,10 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Check out repository code
 | 
					      - name: Check out repository code
 | 
				
			||||||
        uses: actions/checkout@v3
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
      - name: Setup Python ${{ matrix.python-version }}
 | 
					      - name: Setup Python 3.10
 | 
				
			||||||
        uses: actions/setup-python@v4
 | 
					        uses: actions/setup-python@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          python-version: "3.10"
 | 
					          python-version: "3.10"
 | 
				
			||||||
      # - name: Install dependencies
 | 
					 | 
				
			||||||
      #   run: pip install -r requirements.txt && pip install -r requirements-dev.txt
 | 
					 | 
				
			||||||
      - name: Install build dependencies
 | 
					      - name: Install build dependencies
 | 
				
			||||||
        run: pip install setuptools wheel
 | 
					        run: pip install setuptools wheel
 | 
				
			||||||
      - name: Build wheel file
 | 
					      - name: Build wheel file
 | 
				
			||||||
@@ -107,15 +106,3 @@ jobs:
 | 
				
			|||||||
        with:
 | 
					        with:
 | 
				
			||||||
          name: whl
 | 
					          name: whl
 | 
				
			||||||
          path: dist/
 | 
					          path: dist/
 | 
				
			||||||
 | 
					 | 
				
			||||||
  publish:
 | 
					 | 
				
			||||||
    name: Publish
 | 
					 | 
				
			||||||
    needs: build
 | 
					 | 
				
			||||||
    if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Publish to PyPI
 | 
					 | 
				
			||||||
        uses: pypa/gh-action-pypi-publish@release/v1
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          user: __token__
 | 
					 | 
				
			||||||
          password: ${{ secrets.PYPI_API_TOKEN }}
 | 
					 | 
				
			||||||
							
								
								
									
										65
									
								
								.github/workflows/ci-pull-request.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/ci-pull-request.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,65 @@
 | 
				
			|||||||
 | 
					name: CI
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    paths-ignore:
 | 
				
			||||||
 | 
					      - 'README.md'
 | 
				
			||||||
 | 
					      - 'LICENSE.md'
 | 
				
			||||||
 | 
					      - '.gitignore'
 | 
				
			||||||
 | 
					      - 'renovate.json'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  analyze:
 | 
				
			||||||
 | 
					    name: Analyze
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      actions: read
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
 | 
					      security-events: write
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout repository
 | 
				
			||||||
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Initialize CodeQL
 | 
				
			||||||
 | 
					        uses: github/codeql-action/init@v2
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          languages: python
 | 
				
			||||||
 | 
					      - name: Autobuild
 | 
				
			||||||
 | 
					        uses: github/codeql-action/autobuild@v2
 | 
				
			||||||
 | 
					      - name: Perform CodeQL Analysis
 | 
				
			||||||
 | 
					        uses: github/codeql-action/analyze@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  lint:
 | 
				
			||||||
 | 
					    name: Lint
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Check out repository code
 | 
				
			||||||
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Setup Python
 | 
				
			||||||
 | 
					        uses: actions/setup-python@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: "3.10"
 | 
				
			||||||
 | 
					      - name: Install dependencies
 | 
				
			||||||
 | 
					        run: pip install -r requirements.txt && pip install -r requirements-dev.txt
 | 
				
			||||||
 | 
					      - name: Lint
 | 
				
			||||||
 | 
					        run: pylint --recursive=yes .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  test:
 | 
				
			||||||
 | 
					    name: Run unit tests
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        python-version: [ '3.10' ]
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Check out repository code
 | 
				
			||||||
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Setup Python ${{ matrix.python-version }}
 | 
				
			||||||
 | 
					        uses: actions/setup-python@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ matrix.python-version }}
 | 
				
			||||||
 | 
					      - name: Install dependencies
 | 
				
			||||||
 | 
					        run: pip install -r requirements.txt && pip install -r requirements-dev.txt
 | 
				
			||||||
 | 
					      - name: Run test suite
 | 
				
			||||||
 | 
					        run: coverage run -m py.test -v
 | 
				
			||||||
 | 
					      - name: Upload Coverage to Codecov
 | 
				
			||||||
 | 
					        uses: codecov/codecov-action@v3
 | 
				
			||||||
		Reference in New Issue
	
	Block a user