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.
Github action that tests python package. Currently only works with unittest and Python 3.
- This action assumes that a comprehensive dependency list exists in the project. The location of such list can be specified with parameters.
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
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