forked from google-deepmind/meltingpot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflows to use composite actions
- Loading branch information
Showing
12 changed files
with
246 additions
and
140 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: install-examples | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Melting Pot | ||
uses: ./.github/actions/install-meltingpot | ||
- name: Install requirements for examples | ||
shell: bash | ||
# run: pip -r examples/requirements.txt | ||
run: pip install matplotlib | ||
- name: Show installed dependencies | ||
shell: bash | ||
run: pip list |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: install-meltingpot | ||
|
||
inputs: | ||
python-version: | ||
description: Python version | ||
required: false | ||
default: '3.10' | ||
type: string | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Python | ||
id: setup | ||
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: setup.py | ||
- name: Show Cache | ||
shell: bash | ||
run: | | ||
echo "cache-hit=${{ steps.setup.outputs.cache-hit }}" | ||
pip cache list | ||
- name: Show contents | ||
shell: bash | ||
run: ls -la | ||
- name: Show mp contents | ||
shell: bash | ||
run: ls -la meltingpot | ||
- name: Install Python dependencies | ||
if: steps.setup.outputs.cache-hit == 'false' | ||
shell: bash | ||
run: | | ||
pip install -e .[dev] | ||
pip cache list | ||
- name: Show installed dependencies | ||
shell: bash | ||
run: pip list |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: pylint-examples | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-examples/action.yml' | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pylint-examples.yml' | ||
- '.pylintrc' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-examples/action.yml' | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pylint-examples.yml' | ||
- '.pylintrc' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
pylint: | ||
name: Lint examples | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout Melting Pot | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 | ||
- name: Install examples | ||
uses: ./.github/actions/install-examples | ||
- name: Run PyLint on examples | ||
run: pylint --errors-only examples |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: pylint-meltingpot | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pylint-meltingpot.yml' | ||
- '.pylintrc' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pylint-meltingpot.yml' | ||
- '.pylintrc' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
pylint: | ||
name: Lint Melting Pot | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout Melting Pot | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 | ||
- name: Install Melting Pot | ||
uses: ./.github/actions/install-meltingpot | ||
- name: Run PyLint on Melting Pot | ||
run: pylint --errors-only meltingpot |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: pytype-examples | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-examples/action.yml' | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pytype-examples.yml' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
- 'pyproject.toml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-examples/action.yml' | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pytype-examples.yml' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
- 'pyproject.toml' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
pytype: | ||
name: Typecheck examples | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout Melting Pot | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 | ||
- name: Install examples | ||
uses: ./.github/actions/install-examples | ||
- name: Run PyType on examples | ||
run: pytype examples |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: pytype-meltingpot | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pytype-meltingpot.yml' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
- 'pyproject.toml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/actions/install-meltingpot/action.yml' | ||
- '.github/workflows/pytype-meltingpot.yml' | ||
- 'examples/**' | ||
- 'meltingpot/**' | ||
- 'pyproject.toml' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
pytype: | ||
name: Typecheck Melting Pot | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout Melting Pot | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 | ||
- name: Install Melting Pot | ||
uses: ./.github/actions/install-meltingpot | ||
- name: Run PyType on Melting Pot | ||
run: pytype meltingpot |
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.