Skip to content

update pre-commits #135

update pre-commits

update pre-commits #135

Workflow file for this run

---
name: test_build
on:
push:
paths:
- "src/**.py"
- "tests/**.py"
- "setup.cfg"
- "MANIFEST.in"
- "pyproject.toml"
- "requirements.txt"
- ".github/workflows/test_build.yaml"
- ".github/workflows/tag_and_release.yaml"
pull_request:
paths:
- "src/**.py"
- "tests/**.py"
- "setup.cfg"
- "MANIFEST.in"
- "pyproject.toml"
- "requirements.txt"
- ".github/workflows/test_build.yaml"
- ".github/workflows/tag_and_release.yaml"
jobs:
test_build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python-version: ["3.7", "3"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install build tools
run: pip install setuptools wheel build pyinstaller
- name: Install requirements
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Tests - Source
run: python tests/tests.py
- name: Run build
run: python3 -m build
- name: Get Wheel File Path
id: getwheelfile
shell: bash
run: echo "::set-output name=wheelfile::$(find "dist" -type f -name "*.whl")"
- name: Test pip install of wheel
shell: bash
run: pip install $(find "dist" -type f -name "*.whl")
- name: Test python import besapi
shell: bash
run: python -c "import besapi"
- name: Test python import bescli
shell: bash
run: python -c "import bescli"
- name: Test python bescli
shell: bash
run: python -m bescli ls logout clear error_count version exit
- name: Run Tests - Pip
run: python tests/tests.py --test_pip
- name: Test pyinstaller build
run: pyinstaller --clean --collect-all besapi --onefile ./src/bescli/bescli.py
- name: Test bescli binary
run: ./dist/bescli ls logout clear error_count version exit