Skip to content

Commit

Permalink
Adding timeout to all github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfarouk committed Apr 15, 2024
1 parent 78e8162 commit a095a6c
Show file tree
Hide file tree
Showing 7 changed files with 224 additions and 238 deletions.
1 change: 1 addition & 0 deletions .github/workflows/SlowCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 180
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
Expand Down
69 changes: 35 additions & 34 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
name: Coverage
on: [push]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: '3.12'
- name: Generate coverage report
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
# negmas genius-setup
# export NEGMAS_SLOW_TEST=True
# export NEGMAS_BRIDGE_OPS
# unset NEGMAS_BRIDGE_OPS
# python -W ignore -m pytest negmas tests || python -W ignore -m pytest --last-failed .
# export NEGMAS_BRIDGE_OPS=True
# python -W ignore -m pytest tests/test_genius_bridge.py || python -W ignore -m pytest --last-failed .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.codecov }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
run:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: "3.12"
- name: Generate coverage report
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
# negmas genius-setup
# export NEGMAS_SLOW_TEST=True
# export NEGMAS_BRIDGE_OPS
# unset NEGMAS_BRIDGE_OPS
# python -W ignore -m pytest negmas tests || python -W ignore -m pytest --last-failed .
# export NEGMAS_BRIDGE_OPS=True
# python -W ignore -m pytest tests/test_genius_bridge.py || python -W ignore -m pytest --last-failed .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.codecov }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
52 changes: 24 additions & 28 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@

name: Documentation

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
docs:
name: "Build Documentation"
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v2"
- uses: r-lib/actions/setup-pandoc@v1
- uses: "actions/setup-python@v2"
with:
python-version: '3.12'

- name: "Install documentation requirements"
run: |
ulimit -n 50000
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m pip install -e .
- name: "Create documentation"
run: sh make_docs.sh
working-directory: ./docs
docs:
name: "Build Documentation"
runs-on: "ubuntu-latest"
timeout-minutes: 60
steps:
- uses: "actions/checkout@v2"
- uses: r-lib/actions/setup-pandoc@v1
- uses: "actions/setup-python@v2"
with:
python-version: "3.12"
- name: "Install documentation requirements"
run: |
ulimit -n 50000
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m pip install -e .
- name: "Create documentation"
run: sh make_docs.sh
working-directory: ./docs
93 changes: 46 additions & 47 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
name: PyPI

on: push
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: '3.12'
- uses: actions/setup-java@v2
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '15'
- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "Check long_description"
run: "python -m twine check dist/*"
- name: Publish distribution 📦 to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypitesttoken }}
repository_url: https://test.pypi.org/legacy/
- name: "Run all tests"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
# negmas genius-setup
# export NEGMAS_IGNORE_TEST_NOTEBOOKS=False; python -W ignore -m pytest negmas tests
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypiapitoken }}
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: "ubuntu-latest"
timeout-minutes: 60
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: "3.12"
- uses: actions/setup-java@v2
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "15"
- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "Check long_description"
run: "python -m twine check dist/*"
- name: Publish distribution 📦 to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypitesttoken }}
repository_url: https://test.pypi.org/legacy/
- name: "Run all tests"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
# negmas genius-setup
# export NEGMAS_IGNORE_TEST_NOTEBOOKS=False; python -W ignore -m pytest negmas tests
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypiapitoken }}
149 changes: 70 additions & 79 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,73 @@
name: CI

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]

push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"

strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_FASTRUN=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "python -W ignore -m pytest negmas tests/core || python -W ignore -m pytest --last-failed ."

package:
name: "Build & verify package"
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: '3.11'

- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"

install-dev:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]

name: "Verify dev env"
runs-on: "${{ matrix.os }}"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: '3.11'
- name: "Install in dev mode"
run: |
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Import package"
run: "python -c 'import negmas; print(negmas.__version__)'"
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 180
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_FASTRUN=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "python -W ignore -m pytest negmas tests/core || python -W ignore -m pytest --last-failed ."
package:
name: "Build & verify package"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.11"
- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
install-dev:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
name: "Verify dev env"
runs-on: "${{ matrix.os }}"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.11"
- name: "Install in dev mode"
run: |
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Import package"
run: "python -c 'import negmas; print(negmas.__version__)'"
1 change: 1 addition & 0 deletions .github/workflows/test_jupyter_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 180
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
Expand Down
Loading

0 comments on commit a095a6c

Please sign in to comment.