Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

build(deps): bump actions/checkout from 3 to 4 #452

build(deps): bump actions/checkout from 3 to 4

build(deps): bump actions/checkout from 3 to 4 #452

Workflow file for this run

name: Python
on:
push:
pull_request:
branches: [master]
release:
types:
- created
env:
PYTHON_VERSION: 3.9
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
with:
extra_args: --verbose --all-files
test:
name: Run the tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
- name: Run pytest
run: |
pytest -vv
pytest -vv > pytest-coverage.txt
- name: Comment coverage
uses: coroo/pytest-coverage-commentator@v1.0.2
if: ${{ github.event_name == 'pull_request' && github.event.action == 'created' }}
build:
name: Build linkedin_messaging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
- run: flit build
deploy:
name: Deploy to PyPi
runs-on: ubuntu-latest
needs: [lint, test, build]
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
env:
FLIT_USERNAME: "__token__"
FLIT_PASSWORD: ${{ secrets.PYPI_DEPLOY_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
- run: flit build
- run: flit publish