Python Test #580
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python Test | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '0 8 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install yarl==1.9.4 multidict==6.0.5 aiohttp==3.8.6 pytest==6.2.5 coverage==5.5 importlib-metadata==1.7.0 zipp==2.2.1 typing-extensions && python setup.py install | |
| if: matrix.python-version == '3.7' | |
| - name: Install dependencies | |
| run: pip install yarl==1.15.2 pytest coverage aiohttp==3.8.6 && python setup.py install | |
| if: matrix.python-version == '3.8' | |
| - name: Install dependencies | |
| run: python -m pip install setuptools && python setup.py install && pip install pytest coverage | |
| if: matrix.python-version != '3.7' && matrix.python-version != '3.8' | |
| - name: Install dependencies | |
| run: python -m pip install setuptools alibabacloud-tea && python setup.py install && pip install pytest coverage | |
| if: matrix.python-version == '3.12' | |
| - name: Test with unittest | |
| run: | | |
| coverage run --source="./darabonba" -m pytest tests/ | |
| - name: Upload Coverage Report | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} # required |