-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make GitHub Actions tests faster and clearer
* commit again same changes needed Signed-off-by: dafnapension <dafnashein@yahoo.com> * maybe Signed-off-by: dafnapension <dafnashein@yahoo.com> * maybe Signed-off-by: dafnapension <dafnashein@yahoo.com> * maybe Signed-off-by: dafnapension <dafnashein@yahoo.com> * removed the reporter following job Signed-off-by: dafnapension <dafnashein@yahoo.com> * Add minor change to github action Signed-off-by: elronbandel <elronbandel@gmail.com> * Make sure there are no more then one job running for each pull request at the same time Signed-off-by: elronbandel <elronbandel@gmail.com> * Fix Signed-off-by: elronbandel <elronbandel@gmail.com> * Update Signed-off-by: elronbandel <elronbandel@gmail.com> * Update Signed-off-by: elronbandel <elronbandel@gmail.com> * Shorten jobs names for better visability Signed-off-by: elronbandel <elronbandel@gmail.com> --------- Signed-off-by: dafnapension <dafnashein@yahoo.com> Signed-off-by: elronbandel <elronbandel@gmail.com> Co-authored-by: elronbandel <elronbandel@gmail.com>
- Loading branch information
1 parent
fbbbebe
commit b44e3e9
Showing
11 changed files
with
108 additions
and
43 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
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 |
---|---|---|
@@ -1,34 +1,48 @@ | ||
name: Test Catalog Preparation | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
run-catalog-preparation: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
OS: ubuntu-latest | ||
UNITXT_DEFAULT_VERBOSITY: error | ||
DATASETS_VERBOSITY: error | ||
HF_HUB_VERBOSITY: error | ||
HF_DATASETS_DISABLE_PROGRESS_BARS: "True" | ||
TQDM_DISABLE: "True" | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-catalog_preparation.yml | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
- run: uv pip install --system ".[tests]" | ||
- run: huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} | ||
jobs: | ||
preparation: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
OS: ubuntu-latest | ||
UNITXT_DEFAULT_VERBOSITY: error | ||
DATASETS_VERBOSITY: error | ||
HF_HUB_VERBOSITY: error | ||
HF_DATASETS_DISABLE_PROGRESS_BARS: "True" | ||
TQDM_DISABLE: "True" | ||
|
||
strategy: | ||
matrix: | ||
modulo: [0,1,2,3,4,5,6,7] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
- run: uv pip install --system ".[tests]" | ||
- run: huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} | ||
|
||
- name: Run Tests | ||
run: | | ||
modulo="${{ matrix.modulo }}" | ||
echo "modulo=${modulo}" >> $GITHUB_STEP_SUMMARY | ||
echo "sed -i 's/^num_par = 1 /num_par = 8 /' tests/catalog/test_preparation.py" > sedit.sh | ||
echo "sed -i 's/^modulo = 0/modulo = ${modulo}/' tests/catalog/test_preparation.py" >> sedit.sh | ||
sh sedit.sh | ||
python -m unittest tests.catalog.test_preparation | ||
- name: Run Tests | ||
run: python -m unittest discover -s tests/catalog -p "test_*.py" |
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
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
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
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
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
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
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
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
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