Skip to content

Update pypa/gh-action-pypi-publish digest to 218af42 #168

Update pypa/gh-action-pypi-publish digest to 218af42

Update pypa/gh-action-pypi-publish digest to 218af42 #168

Workflow file for this run

name: CI
# Workflow does NOT trigger on a feature branch until a pull request is created.
# Workflow will always run when a pull request is merged to the default branch.
on:
pull_request: {}
push:
branches: ["main"]
env:
PYTHON_VERSION: "3.8"
jobs:
bandit:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
test-requirements: "true"
- name: Run bandit
run: bandit --ini .bandit -r exporter
black:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
test-requirements: "true"
- name: Run black
run: black --check exporter tests
flake8:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
test-requirements: "true"
- name: Run flake8
run: flake8 exporter tests
isort:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
requirements: "true"
test-requirements: "true"
- name: Run isort
run: isort --recursive --force-grid-wrap 0 --check-only exporter tests
mypy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Run mypy
uses: ./.github/actions/install-dependencies
with:
path: 'exporter tests'
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9" ]
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
requirements: "true"
test-requirements: "true"
- name: Run pytest
run: pytest --cov-report xml:coverage-${{ matrix.python-version }}.xml --junitxml=test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results artifact
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
verify-wheel:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9" ]
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build wheel
uses: ./.github/actions/build-dist
- name: Verify wheel
uses: ./.github/actions/verify-wheel
with:
package-import-name: "exporter"