Commit d98296ac authored by muyangli's avatar muyangli
Browse files

finally passing all tests

parent bf5b7553
name: pr_test_linux name: pr_test_5090
on: on:
workflow_dispatch: # launch manually for now since there is no sandbox. workflow_dispatch:
inputs:
test_target:
description: 'What to test: "pr" or "branch"'
required: true
type: choice
options:
- pr
- branch
pr_number:
description: 'Pull Request Number (only if test_target == "pr")'
required: false
branch_name:
description: 'Branch name (only if test_target == "branch")'
default: 'main'
required: false
# push: # push:
# branches: [ main ] # branches: [ main ]
# paths: # paths:
...@@ -47,10 +64,19 @@ jobs: ...@@ -47,10 +64,19 @@ jobs:
if: ${{ github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true' }} if: ${{ github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true' }}
steps: steps:
- name: Determine ref
id: set-ref
run: |
if [[ "${{ github.event.inputs.test_target }}" == "pr" ]]; then
echo "ref=refs/pull/${{ github.event.inputs.pr_number }}/merge" >> $GITHUB_OUTPUT
else
echo "ref=refs/heads/${{ github.event.inputs.branch_name }}" >> $GITHUB_OUTPUT
fi
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
# ref: ${{ github.event.pull_request.head.sha || github.sha }} # ref: ${{ github.event.pull_request.head.sha || github.sha }}
ref: ${{ steps.set-ref.outputs.ref }}
submodules: true submodules: true
- name: Show current commit - name: Show current commit
...@@ -102,7 +128,7 @@ jobs: ...@@ -102,7 +128,7 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/flux/test_flux_memory.py NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT_LINUX }} HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/flux/test_flux_memory.py
test-flux-other: test-flux-other:
needs: build needs: build
...@@ -117,7 +143,7 @@ jobs: ...@@ -117,7 +143,7 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/flux --ignore=tests/flux/test_flux_memory.py NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT_LINUX }} HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/flux --ignore=tests/flux/test_flux_memory.py
test-sana: test-sana:
needs: build needs: build
...@@ -132,11 +158,11 @@ jobs: ...@@ -132,11 +158,11 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/sana NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT_LINUX }} HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/sana
clean-up: clean-up:
if: always() && (github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true') if: always() && (github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true')
needs: [ set-up-build-env, test-flux-memory, test-flux-other ] needs: [ set-up-build-env, test-flux-memory, test-flux-other, test-sana ]
runs-on: self-hosted runs-on: self-hosted
steps: steps:
......
...@@ -162,7 +162,7 @@ jobs: ...@@ -162,7 +162,7 @@ jobs:
clean-up: clean-up:
if: always() && (github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true') if: always() && (github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true')
needs: [ set-up-build-env, test-flux-memory, test-flux-other ] needs: [ set-up-build-env, test-flux-memory, test-flux-other, test-sana ]
runs-on: self-hosted runs-on: self-hosted
steps: steps:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment