Bump tox from 4.11.3 to 4.12.0 #364
Workflow file for this run
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: Pull Request Handler | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Python | |
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 unit tests | |
env: | |
version: ${{ matrix.python-version }} | |
run: tox run -e py$version -- --junitxml $version.results.xml | |
- name: Upload test results | |
uses: actions/upload-artifact@master | |
with: | |
name: Results - ${{ matrix.python-version }} | |
path: ${{ matrix.python-version }}.results.xml | |
- name: Run lint scan | |
run: tox run -e lint | |
- name: Run SAST scan | |
run: tox run -e sast | |
- name: Run SCA scan | |
run: tox run -e sca | |
bump-version: | |
if: github.base_ref == 'master' | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
pip install bump2version==1.0.1 | |
- name: Checkout head branch | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Bump version | |
run: | | |
grep -i 'current_version = ' setup.cfg | head -1 | tr -d 'current_version = ' | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
bump2version minor | |
grep -i 'current_version = ' setup.cfg | head -1 | tr -d 'current_version = ' | |
- name: Push changes to origin | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.head_ref }} |