Skip to content

Commit

Permalink
chore: run all tests when setup.py is modified
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Nov 14, 2023
1 parent a98fd69 commit 90f90a2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/neuron/**.py"
- "tests/**.py"
- "examples/**.py"

pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/neuron/**.py"
- "tests/**.py"
- "examples/**.py"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/neuron/**.py"
- "tests/**.py"
- "examples/**.py"
- "tools/**.py"

pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/neuron/**.py"
- "tests/**.py"
- "examples/**.py"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_inf1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"

concurrency:
Expand All @@ -26,7 +28,7 @@ jobs:
- name: Install python dependencies
run: |
sudo apt install python3.8-venv -y
python3 -m venv aws_neuron_venv_pytorch
python3 -m venv aws_neuron_venv_pytorch
source aws_neuron_venv_pytorch/bin/activate
python -m pip install -U pip
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_inf2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"

concurrency:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_trainium_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"

concurrency:
Expand Down Expand Up @@ -35,5 +37,5 @@ jobs:
- name: Run tests on Neuron cores
run: |
HF_TOKEN_OPTIMUM_NEURON_CI=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} USE_VENV="false" pytest -m "is_trainium_test" $TESTS_TO_IGNORE_FLAGS tests
- name: Run staging tests on Neuron cores
- name: Run staging tests on Neuron cores
run: HUGGINGFACE_CO_STAGING=1 pytest -m "is_trainium_test and is_staging_test" $TESTS_TO_IGNORE_FLAGS tests -s
6 changes: 4 additions & 2 deletions .github/workflows/test_trainium_distributed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/neuron/distributed/**.py"
pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/neuron/distributed/**.py"

concurrency:
Expand All @@ -17,7 +19,7 @@ concurrency:

jobs:
optimum-neuron-tests:
runs-on: [self-hosted, 16-aws-trn, 128-cpu, ci]
runs-on: [self-hosted, 16-aws-trn, 128-cpu, ci]
env:
AWS_REGION: us-east-1
steps:
Expand All @@ -32,4 +34,4 @@ jobs:
- name: Run tests on Neuron cores
run: |
HF_TOKEN_OPTIMUM_NEURON_CI=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m "is_trainium_test" tests/distributed/

0 comments on commit 90f90a2

Please sign in to comment.