Merge pull request #90 from drunkdream/bugfix/socks-auth #222
This file contains 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: Unittest | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
os: [ubuntu-20.04, windows-2019, macos-13] | |
exclude: | |
- os: macos-13 | |
python-version: '3.7' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo python -m pip install --upgrade pip pytest pytest-cov pytest-tornasync codecov | |
sudo python -m pip install -r requirements.txt | |
else | |
python -m pip install --upgrade pip pytest pytest-cov pytest-tornasync codecov | |
python -m pip install -r requirements.txt | |
fi | |
shell: bash | |
- name: Run Tests | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo python -m pytest --cov=. | |
else | |
python -m pytest --cov=. | |
fi | |
shell: bash | |
- name: Upload coverage reports to Codecov | |
run: | | |
codecov -t ${{ secrets.CODECOV_TOKEN }} |