-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: dafnapension <[email protected]>
- Loading branch information
1 parent
13aa641
commit 15e2ba2
Showing
6 changed files
with
203 additions
and
115 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test Docs Compilation | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
compile-docs: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
OS: ubuntu-latest | ||
PYTHONPATH: ./docs | ||
|
||
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,docs]" | ||
|
||
- name: Compile Docs | ||
run: make docs | ||
|
||
|
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,65 @@ | ||
name: Test Performance | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
run-performance-tests: | ||
|
||
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" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install Requirements | ||
run: | | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
uv pip install --system -e ".[tests]" | ||
- name: Prepare the dirs for performance evaluation in main | ||
run: | | ||
mkdir -p performance_action | ||
mkdir -p performance_action/logs | ||
echo "" > performance_action/__init__.py | ||
echo " " > performance_action/logs/cards_benchmark.prof | ||
echo " " > performance_action/logs/cards_benchmark.json | ||
cp performance/card_profiler.py performance_action/card_profiler.py | ||
cp performance/compare_performance_results.py performance_action/compare_performance_results.py | ||
- name: Checkout main branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
clean: false | ||
|
||
- name: Run performance on main branch | ||
run: | | ||
python performance_action/card_profiler.py --output_file performance_action/main_results.json | ||
- name: Checkout PR branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
clean: false | ||
|
||
- name: Run performance on PR branch | ||
run: | | ||
python performance_action/card_profiler.py --output_file performance_action/pr_results.json | ||
- name: Compare main and PR performance results | ||
run: | | ||
python performance_action/compare_performance_results.py performance_action/main_results.json performance_action/pr_results.json >> $GITHUB_STEP_SUMMARY |
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,28 @@ | ||
name: Verify Code Quality & Security | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
verify-pre-commit-executed: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Install requirements | ||
run: | | ||
pip install ".[dev]" | ||
- name: Install the pre-commit hooks | ||
run: | | ||
pre-commit install | ||
- name: Validate all pre-commit verification were run correctly | ||
run: | | ||
pre-commit run --all-files | ||
- name: Send failure message | ||
if: failure() # This step will only run if a previous step failed | ||
run: echo "The quality & security verification failed. This is likely due to not using pre-commit hooks please run 'pre-commit install' befroe any commit. " |
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,26 @@ | ||
name: Test HELM Integration | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test-helm: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
OS: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' # caching pip dependencies | ||
- run: pip install --upgrade 'crfm-helm[unitxt]>=0.5.3' | ||
|
||
- name: Test Helm | ||
run: utils/run_helm.sh | ||
|
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