Run Python tests on Github actions runner
This will let us parallelize these tests across multiple Python/OS
versions easier.
@@ -6,7 +6,7 @@ jobs:
self_hosted_tests:
timeout-minutes: 15
runs-on: self-hosted
- name: 'Self-hosted tests'
+ name: 'Tool-based tests'
steps:
- uses: actions/checkout@v2
- run: git submodule update --init --recursive third_party/tools/openroad
@@ -26,14 +26,28 @@ jobs:
${{ github.workspace }}/tests/tools
python_test_job:
- timeout-minutes: 5
- runs-on: self-hosted
- name: 'Python unit tests'
+ timeout-minutes: 15
+ runs-on: ubuntu-latest
+ name: 'Pure Python tests'
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v2
+
- run: git submodule update --init --recursive third_party/tools/openroad
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+
- run: |
- python3 -m venv create $GITHUB_WORKSPACE/clean_env --clear
- source $GITHUB_WORKSPACE/clean_env/bin/activate
- pip3 install -r $GITHUB_WORKSPACE/requirements.txt -e $GITHUB_WORKSPACE/.
- pytest $GITHUB_WORKSPACE/tests/quick_tests/python/ $GITHUB_WORKSPACE/tests/api_tests/
+ pip install $GITHUB_WORKSPACE/.
+ pip install pytest
+ pytest --import-mode=append $TEST_PATHS
+ env:
+ TEST_PATHS: >
+ ${{ github.workspace }}/tests/quick_tests/python
+ ${{ github.workspace }}/tests/api_tests
