Skip to content

onichandame/python-test-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

NOTICE

This action has a fatal caveat #1 that almost makes it unusable. As this action is a thin wrapper around venv and unittest, it is recommended to dump this action and run bash commands directly.

python-test-action

Github action that tests python package. Currently only works with unittest and Python 3.

Author

onichandame

Pre-requisite

  1. This action assumes that a comprehensive dependency list exists in the project. The location of such list can be specified with parameters.

Usage

Basic

edit .github/workflows/python-test.yml

add content:

name: Test
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Prepare repo
        uses: actions/checkout@master
      - name: Test
        uses: onichandame/python-test-action@master

Advanced

If some customization is required, several parameters can be added.

name: Test
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-python@v2
        with:
          python-version: '3.8'
      - name: Test
        uses: onichandame/python-test-action@master
        with:
          deps_list: 'requirement'
  • deps_list: the dependency list. default to requirements.txt

About

Github action that tests python package

Resources

License

Stars

Watchers

Forks

Packages

No packages published