Create test.txt #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | |
# on: [push] | |
on: | |
pull_request: | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
# This is the version of the action for setting up Python, not the Python version. | |
uses: actions/setup-python@v4 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.12' | |
# Optional - x64 or x86 architecture, defaults to x64 | |
architecture: 'x64' | |
- name: Install OS dependencies | |
run: | | |
apt-get update | |
apt-get install --no-install-recommends wget ca-certificates git build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev libxml2-dev libxslt1-dev libre2-dev pkg-config | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --no-binary lxml lxml | |
pip install coverage | |
pip install . | |
- name: Run unittests with coverage report | |
run: | | |
coverage run -m unittest discover -p "*_test.py" | |
coverage xml --data-file=.coverage | |
# You can test your matrix by printing the current Python version | |
# - name: Display Python version | |
# run: python -c "import sys; print(sys.version)" | |
- name: Get Cover | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} |