Skip to content

Commit

Permalink
Combine pytest, pylint, and pytype checks into one action
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 673856815
Change-Id: I47c77cab1bd04ec324efca94d9f3627fdb09699b
  • Loading branch information
jagapiou authored and copybara-github committed Sep 12, 2024
1 parent bb2a70b commit 9dedf52
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 182 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/pylint-examples.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/pylint-meltingpot.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/pytype-examples.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/pytype-meltingpot.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '.github/actions/install-examples/action.yml'
- '.github/actions/install-meltingpot/action.yml'
- '.github/workflows/test-examples.yml'
- '.pylintrc'
- 'examples/**'
- 'meltingpot/**'
- 'pyproject.toml'
Expand All @@ -19,6 +20,7 @@ on:
- '.github/actions/install-examples.yml'
- '.github/actions/install-meltingpot.yml'
- '.github/workflows/test-examples.yml'
- '.pylintrc'
- 'examples/**'
- 'meltingpot/**'
- 'pyproject.toml'
Expand All @@ -32,7 +34,7 @@ concurrency:
permissions: read-all

jobs:
pytest:
test-examples:
name: Test examples
runs-on: ubuntu-latest
timeout-minutes: 90
Expand All @@ -45,3 +47,9 @@ jobs:

- name: Test examples
run: pytest examples

- name: Lint examples
run: pylint --errors-only examples

- name: Typecheck examples
run: pytype examples
12 changes: 11 additions & 1 deletion .github/workflows/test-meltingpot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- '.github/actions/install-meltingpot/action.yml'
- '.github/workflows/test-meltingpot.yml'
- '.pylintrc'
- 'meltingpot/**'
- 'pyproject.toml'
- 'setup.py'
Expand All @@ -16,6 +17,7 @@ on:
paths:
- '.github/actions/install-meltingpot/action.yml'
- '.github/workflows/test-meltingpot.yml'
- '.pylintrc'
- 'meltingpot/**'
- 'pyproject.toml'
- 'setup.py'
Expand All @@ -28,7 +30,7 @@ concurrency:
permissions: read-all

jobs:
pytest:
test-meltingpot:
name: Test Melting Pot
runs-on: ${{ matrix.os }}
env:
Expand All @@ -45,9 +47,17 @@ jobs:
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

- name: Lint Melting Pot
run: pylint --errors-only meltingpot

- name: Typecheck Melting Pot
run: pytype meltingpot

0 comments on commit 9dedf52

Please sign in to comment.