Git Product home page Git Product logo

setup-pdm's Introduction

Setup PDM for GitHub Action

A GitHub Action that installs pdm properly for all Python versions

Why do I need this action?

As you know, PDM requires Python 3.7 and higher to install the package, while till now(March 2021) Python 3.6 is still widely used by many libraries. The version requirement will prevent potential users from adopting PDM. However, it is a misunderstanding, PDM CAN run projects using Python 3.6 or even Python 2! But it is still not obvious and it is a pain for developers to properly build their CI workflows. So I made pdm-project/setup-pdm to solve the problem. It is PDM-for-CI done right!

Usage

Include the action in your workflow yaml file with the following arguments:

steps:
    ...
    - uses: pdm-project/setup-pdm@main
      name: Setup PDM
      with:
        python-version: 3.8  # Version range or exact version of a Python version to use, the same as actions/setup-python
        architecture: x64    # The target architecture (x86, x64) of the Python interpreter. the same as actions/setup-python
        version: 1.4.0       # The version of PDM to install. Leave it as empty to use the latest version from PyPI
        prerelease: true     # Allow prerelease versions to be installed
        enable-pep582: true  # Enable PEP 582 package loading globally
    - name: Install dependencies
      run: pdm install       # Then you can use pdm in the following steps.
    ...

You don't need actions/setup-python actually.

setup-pdm's People

Contributors

frostming avatar knowsuchagency avatar pawamoy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.