mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-01 00:17:55 +03:00 
			
		
		
		
	* Add GA test and linter jobs * Remove not used async run() functions from tests * Update aiohttp ext test * Add botocore warning ignores * Update changelog * Update publishing job config for testing * Publishing test #1 * Update GA tests-and-linters job to use latest ubuntu for tests * Update publishing GA job
		
			
				
	
	
		
			128 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			128 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Publishing
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     tags:
 | |
|       - '*'
 | |
| 
 | |
| jobs:
 | |
| 
 | |
|   tests:
 | |
|     name: Run tests
 | |
|     runs-on: ubuntu-20.04
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/setup-python@v2
 | |
|         with:
 | |
|           python-version: "3.10"
 | |
|       - run: pip install tox
 | |
|       - run: tox
 | |
|         env:
 | |
|           TOXENV: "3.10"
 | |
| 
 | |
|   linters:
 | |
|     name: Run linters
 | |
|     runs-on: ubuntu-20.04
 | |
|     strategy:
 | |
|       matrix:
 | |
|         toxenv: [flake8, pydocstyle, mypy, pylint]
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/setup-python@v2
 | |
|         with:
 | |
|           python-version: "3.10"
 | |
|       - run: pip install tox
 | |
|       - run: tox
 | |
|         env:
 | |
|           TOXENV: ${{ matrix.toxenv }}
 | |
| 
 | |
|   build-sdist:
 | |
|     name: Build source tarball
 | |
|     needs: [tests, linters]
 | |
|     runs-on: ubuntu-20.04
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/setup-python@v2
 | |
|         with:
 | |
|           python-version: "3.10"
 | |
|       - run: python setup.py sdist
 | |
|       - uses: actions/upload-artifact@v2
 | |
|         with:
 | |
|           path: ./dist/*
 | |
| 
 | |
|   build-wheels:
 | |
|     name: Build wheels
 | |
|     needs: [tests, linters]
 | |
|     runs-on: ${{ matrix.os }}
 | |
|     strategy:
 | |
|       matrix:
 | |
|         os: [ubuntu-20.04, windows-2019, macOS-10.15]
 | |
|     env:
 | |
|       CIBW_SKIP: cp27-win*
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/setup-python@v2
 | |
|         with:
 | |
|           python-version: "3.10"
 | |
|       - run: pip install cibuildwheel==2.1.3
 | |
|       - run: cibuildwheel --output-dir wheelhouse
 | |
|       - uses: actions/upload-artifact@v2
 | |
|         with:
 | |
|           path: ./wheelhouse/*.whl
 | |
| 
 | |
|   build-wheels-linux-aarch64:
 | |
|     name: Build wheels (ubuntu-latest-aarch64)
 | |
|     needs: [tests, linters]
 | |
|     runs-on: ubuntu-20.04
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - name: Set up QEMU
 | |
|         uses: docker/setup-qemu-action@v1
 | |
|       - uses: actions/setup-python@v2
 | |
|         with:
 | |
|           python-version: "3.10"
 | |
|       - run: pip install cibuildwheel==2.1.3
 | |
|       - run: cibuildwheel --archs aarch64 --output-dir wheelhouse
 | |
|       - uses: actions/upload-artifact@v2
 | |
|         with:
 | |
|           path: ./wheelhouse/*.whl
 | |
| 
 | |
|   publish:
 | |
|     name: Publish on PyPI
 | |
|     needs: [build-sdist, build-wheels, build-wheels-linux-aarch64]
 | |
|     runs-on: ubuntu-20.04
 | |
|     steps:
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: artifact
 | |
|           path: dist
 | |
|       - uses: pypa/gh-action-pypi-publish@master
 | |
|         with:
 | |
|           user: __token__
 | |
|           password: ${{ secrets.PYPI_API_TOKEN }}
 | |
|           # For publishing to Test PyPI, uncomment next two lines:
 | |
|           # password: ${{ secrets.TEST_PYPI_API_TOKEN }}
 | |
|           # repository_url: https://test.pypi.org/legacy/
 | |
| 
 | |
|   publish-docs:
 | |
|     name: Publish docs
 | |
|     needs: [publish]
 | |
|     runs-on: ubuntu-18.04
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/setup-python@v2
 | |
|         with:
 | |
|           python-version: "3.10"
 | |
|       - run: pip install -r requirements-doc.txt
 | |
|       - run: pip install awscli
 | |
|       - run: pip install -e .
 | |
|       - run: (cd docs && make clean html)
 | |
|       - run: |
 | |
|           aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
 | |
|           aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
 | |
|           echo "Cache invalidation triggered"          
 | |
|         env:
 | |
|           AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
 | |
|           AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
 | |
|           AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
 |