update release layers script with new python versions #373
This file contains hidden or 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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Run tests | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
| exclude: | |
| # ubuntu-latest (24.04) doesn't support Python 3.6-3.7 (EOL) | |
| - os: ubuntu-latest | |
| python-version: '3.6' | |
| - os: ubuntu-latest | |
| python-version: '3.7' | |
| # macos-latest (ARM64) doesn't support Python 3.6-3.7 (never built for ARM64) | |
| - os: macos-latest | |
| python-version: '3.6' | |
| - os: macos-latest | |
| python-version: '3.7' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Install dependencies for running tests | |
| run: | | |
| python -m pip install flake8 pytest pytest-print | |
| python -m pip install mock httpretty six pympler | |
| - name: Install dependencies for additional checks | |
| run: | | |
| python -m pip install bandit | |
| - name: Install dependencies from requirements | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Lint with flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Run bandit | |
| run: | | |
| # run bandit to find common security issues | |
| bandit -r codeguru_profiler_agent | |
| - name: Run a specific test with logs | |
| run: | | |
| pytest -vv -o log_cli=true test/acceptance/test_live_profiling.py | |
| - name: Run tests with pytest | |
| run: | | |
| pytest -vv | |
| # For local testing, you can use pytest-html if you want a generated html report. | |
| # python -m pip install pytest-html | |
| # pytest -vv --html=pytest-report.html --self-contained-html |