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
38 changes: 38 additions & 0 deletions .github/workflows/index_build_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: indexer tests

permissions:
contents: read

on:
pull_request:
paths:
- 'infra/base-images/base-builder/indexer/**'
- '.github/workflows/index_build_tests.yml'

jobs:
test:
runs-on: ubuntu-latest
permissions:
actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with: # Needed for git diff to work. (get_changed_files)
fetch-depth: 0
- run: |
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master

- name: Setup python environment
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Get latest indexer binary
run: curl -O https://clusterfuzz-builds.storage.googleapis.com/oss-fuzz-artifacts/indexer && chmod +x indexer
working-directory: 'infra/base-images/base-builder/indexer'

- name: Run indexer tests
run: sudo env "PATH=$PATH" INDEX_BUILD_TESTS=1 python -m unittest index_build_test
working-directory: 'infra/base-images/base-builder/indexer'
2 changes: 1 addition & 1 deletion infra/base-images/base-builder/indexer/index_build_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _build_project(self, project: str, *additional_args) -> Sequence[Path]:

out_dir = OSS_FUZZ_DIR / f'build/out/{project}'
docker_args = [
'docker', 'run', '--rm', '-ti', '-e', f'PROJECT_NAME={project}', '-v',
'docker', 'run', '--rm', '-e', f'PROJECT_NAME={project}', '-v',
f'{THIS_DIR}:/opt/indexer', '-v', f'{out_dir}:/out',
f'gcr.io/oss-fuzz/{project}', '/opt/indexer/index_build.py'
]
Expand Down
Loading