Merge pull request #42 from mbdevpl/dependabot/github_actions/actions… #106
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: actions | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - $default-branch | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-13, windows-latest] | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -r requirements_ci.txt | |
| - run: python -m coverage run --branch --source . -m unittest -v | |
| - if: matrix.os == 'ubuntu-latest' | |
| run: sudo apt-get install -y libudev1 | |
| - run: pip install -r requirements_all_github.txt | |
| - run: python -m coverage run --append --branch --source . -m unittest -v | |
| - run: python -m coverage report --show-missing | |
| - run: python -m codecov --token ${{ secrets.CODECOV_TOKEN }} | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - run: pip install build~=1.2 | |
| - run: python -m build | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} |