Skip to content

Commit

Permalink
Refactor cross-platform testing.
Browse files Browse the repository at this point in the history
- Harmonize pre- and post-release testing.
- Do extensive cross-platform testing before and after release.
- Simplify continuous integration tests to only run on ubuntu-latest.

PiperOrigin-RevId: 673875278
Change-Id: I048c8cc100314470d44bb5a13238dfe50d76bb8d
  • Loading branch information
jagapiou authored and copybara-github committed Sep 12, 2024
1 parent 9dedf52 commit f43b98f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,20 @@ jobs:
name: Test
needs: build
if: github.event_name == 'release' || inputs.run_tests
runs-on: ubuntu-latest
timeout-minutes: 60
runs-on: ${{ matrix.os }}
env:
SYSTEM_VERSION_COMPAT: 0 # See https://github.com/actions/setup-python/issues/279.
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
os:
- macos-12
- macos-latest
- ubuntu-20.04
- ubunutu-latest
python-version:
- '3.11'
steps:
- name: Load artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand All @@ -58,7 +70,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip install --upgrade pip
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ jobs:
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install pytest-xdist setuptools
pip install --upgrade setuptools
pip install pytest-xdist
- name: Install from PyPI
run: |
Expand All @@ -66,4 +67,5 @@ jobs:
pip list
- name: Test installation
run: pytest --pyargs meltingpot
run: |
pytest -n auto --pyargs meltingpot
15 changes: 1 addition & 14 deletions .github/workflows/test-meltingpot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,13 @@ permissions: read-all
jobs:
test-meltingpot:
name: Test Melting Pot
runs-on: ${{ matrix.os }}
env:
SYSTEM_VERSION_COMPAT: 0 # See https://github.com/actions/setup-python/issues/279.
timeout-minutes: 180
strategy:
fail-fast: ${{ github.event_name != 'workflow_dispatch' }}
matrix:
os:
- macos-12
- ubuntu-20.04
python-version:
- '3.11'
runs-on: ubuntu-latest
steps:
- name: Checkout Melting Pot
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Install Melting Pot
uses: ./.github/actions/install-meltingpot
with:
python-version: ${{ matrix.python-version }}

- name: Test Melting Pot
run: pytest meltingpot
Expand Down

0 comments on commit f43b98f

Please sign in to comment.