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

dephell/dephell_action

Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DepHell GitHub Action

An official GitHub Action to run DepHell commands.

Input variables:

  • dephell-env -- DepHell environment to run. Default: job name
  • python-version -- Python version to use when creating venv. Default: python3
  • dephell-version -- DepHell version to install. Default: the latest release.

Example

DepHell config (pyproject.toml):

[tool.dephell.pytest]
from = {format = "pip", path = "requirements.txt"}
command = "pytest"

[tool.dephell.flake8]
from = {format = "pip", path = "requirements-flake.txt"}
python = ">=3.6"
command = "flake8"

[tool.dephell.typing]
from = {format = "poetry", path = "pyproject.toml"}
command = "mypy project_name"

GitHub Actions workflow (.github/workflows/main.yml):

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  # env name detected from the job name, python version explicitly enumerated
  pytest:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version:
          - "3.6"
          - "3.7"
          - "3.8"
          - pypy3
    steps:
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Checkout
        uses: actions/checkout@v2
      - name: Run DepHell
        uses: dephell/dephell_action@master

  # env name enumerated, python version is 3.7
  linters:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        dephell-env:
          - flake8
          - typing
    steps:
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: "3.7"
      - name: Checkout
        uses: actions/checkout@v2
      - name: Run DepHell
        uses: dephell/dephell_action@master
        with:
          dephell-env: ${{ matrix.dephell-env }}

See DepHell documentation for details on configuring DepHell.