From 0cf7a0198ba0b16ebd1fd1313658d2532ca17705 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Wed, 22 Jan 2025 16:10:31 +0000 Subject: [PATCH] CI addition work --- .github/workflows/test_checkin.yml | 63 ++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_checkin.yml b/.github/workflows/test_checkin.yml index e69de29..e139164 100644 --- a/.github/workflows/test_checkin.yml +++ b/.github/workflows/test_checkin.yml @@ -0,0 +1,63 @@ +name: Test urubu + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * 0' +jobs: + run_lint: + strategy: + fail-fast: false # So that one fail doesn't stop remaining tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pyflakes + - name: Run lint + continue-on-error: true + run: | + pyflakes urubu + + build_code_linux: + + strategy: + fail-fast: false # So that one fail doesn't stop remaining tests + matrix: + python-version: ["3.8", "3.9", "pypy-3.9", "3.10", "pypy-3.10", "3.11", "3.12"] + runs-on: ubuntu-latest + needs: [run_lint] + + steps: + - uses: actions/checkout@v3 + - name: Report Environment + run: | + echo "Runing tests with env set to : ${{ matrix.target }}" + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install . + - name: Run Tests + run: | + cd urubu/tests ; py.test + + pypy_release: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + needs: [build_code_linux, build_code_windows] + steps: + - uses: actions/checkout@v3 + - name: Make PyPi dist release + run: make dist + - name: Publish Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 75a1ce0..9da9726 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup requires = ['jinja2 >= 2.10', 'pygments', - 'markdown < 3.0', 'pyyaml', 'beautifulsoup4'] + 'markdown', 'pyyaml', 'beautifulsoup4', 'pytest', 'sh'] entry_points = { 'console_scripts': [