3.24.1 #495
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: PR-Actions | |
on: pull_request | |
jobs: | |
Linting: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
os: ['ubuntu-latest'] | |
name: Linting OS ${{ matrix.os }} - Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Need to update if we support other OS's | |
- name: Cache PIP Install | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-lint-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-pip-lint | |
- name: Run Linting | |
run: | | |
pip install black flake8 | |
make lint | |
PyTest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ '3.8', '3.9', '3.10', '3.11'] | |
os: ['ubuntu-latest'] | |
name: PyTests OS ${{ matrix.os }} - Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Need to update if we support other OS's | |
- name: Cache PIP Install | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-install-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-pip-install | |
- name: Make Deps | |
run: make deps | |
- name: Run Tests | |
run: make test | |
CodeCoverage: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
os: ['ubuntu-latest'] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
name: Code Coverage OS ${{ matrix.os }} - Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Need to update if we support other OS's | |
- name: Cache PIP Install | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-coverage-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-pip-coverage | |
- name: Make Deps | |
run: | | |
make deps | |
pip install pytest | |
pip install pytest-cov | |
- name: Generate coverage report | |
continue-on-error: true | |
run: | | |
coverage run --source brewtils -m pytest test --tb=no | |
coverage report -m | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 |