CI addition work #5
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: 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] | |
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 }} |