Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/end2end_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
- '.github/workflows/end2end_tests.yaml'
- 'requirements*.txt'

workflow_dispatch:
inputs:
ref:
description: 'tools ref to test (branch, tag, or SHA; defaults to the selected ref)'
required: false
type: string

Comment thread
klemen1999 marked this conversation as resolved.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -27,14 +34,14 @@

steps:
- name: Checkout
uses: actions/checkout@v4

Check failure on line 37 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5

Check failure on line 44 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
python-version: ${{ matrix.version }}
cache: pip
Expand All @@ -55,15 +62,15 @@
run: pytest tests/test_end2end.py --e2e-suite full --e2e-shard-index ${{ matrix.shard }} --e2e-shard-count 10 --download-weights -s -v

- name: Authenticate to Google Cloud
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
if: matrix.shard == 0 && (github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository)
uses: google-github-actions/auth@v2

Check failure on line 66 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
export_environment_variables: true

- name: Run private model tests
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
if: matrix.shard == 0 && (github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository)
run: pytest tests/test_end2end.py::test_private_model_conversion --test-private --delete-weights-now -s -v

cross_platform_representative:
Expand All @@ -79,14 +86,14 @@

steps:
- name: Checkout
uses: actions/checkout@v4

Check failure on line 89 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5

Check failure on line 96 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
python-version: ${{ matrix.version }}
cache: pip
Expand All @@ -107,13 +114,13 @@
run: pytest tests/test_end2end.py --e2e-suite representative --e2e-shard-index ${{ matrix.shard }} --e2e-shard-count 2 --download-weights -s -v

- name: Authenticate to Google Cloud
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
if: matrix.shard == 0 && (github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository)
uses: google-github-actions/auth@v2

Check failure on line 118 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
export_environment_variables: true

- name: Run private model tests
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
if: matrix.shard == 0 && (github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository)
run: pytest tests/test_end2end.py::test_private_model_conversion --test-private --delete-weights-now -s -v
15 changes: 11 additions & 4 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
- '.github/workflows/unittests.yaml'
- 'requirements*.txt'

workflow_dispatch:
inputs:
ref:
description: 'tools ref to test (branch, tag, or SHA; defaults to the selected ref)'
required: false
type: string

workflow_call:
inputs:
ml_ref:
Expand Down Expand Up @@ -45,8 +52,8 @@ jobs:
if: ${{ inputs.tools_ref == '' && inputs.ml_ref == '' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}
submodules: recursive # Ensures submodules are cloned

- name: Set up Python
Expand Down Expand Up @@ -150,8 +157,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}
Comment thread
klemen1999 marked this conversation as resolved.

- name: Download Artifacts
uses: actions/download-artifact@v4
Expand Down
Loading