Skip to content

Commit c486b63

Browse files
committed
actions: Switch to new test system
Call the internal test system for PRs to replaces the existing GitHub actions. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent f605648 commit c486b63

3 files changed

Lines changed: 47 additions & 88 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: libpisp tests
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
7+
jobs:
8+
trigger-camera-tests:
9+
runs-on: [self-hosted, camera-test-bridge]
10+
if: >-
11+
github.event.pull_request.head.repo.full_name == github.repository
12+
timeout-minutes: 120
13+
steps:
14+
- name: Checkout camera_tester
15+
env:
16+
CAMERA_TESTER_URL: ${{ secrets.CAMERA_TESTER_URL }}
17+
CAMERA_TESTER_PROJECT_ID: ${{ secrets.CAMERA_TESTER_PROJECT_ID }}
18+
CAMERA_TESTER_API_TOKEN: ${{ secrets.CAMERA_TESTER_API_TOKEN }}
19+
run: |
20+
CLONE_URL=$(curl -sf -H "PRIVATE-TOKEN: ${CAMERA_TESTER_API_TOKEN}" \
21+
"${CAMERA_TESTER_URL}/api/v4/projects/${CAMERA_TESTER_PROJECT_ID}" \
22+
| python3 -c "import sys, json; print(json.load(sys.stdin)['http_url_to_repo'])")
23+
AUTH_URL="${CLONE_URL/https:\/\//https://oauth2:${CAMERA_TESTER_API_TOKEN}@}"
24+
find . -mindepth 1 -delete 2>/dev/null || true
25+
git clone --depth 1 "$AUTH_URL" .
26+
27+
- name: Install camera_tester
28+
run: |
29+
python3 -m venv .venv
30+
. .venv/bin/activate
31+
pip install -e .
32+
33+
- name: Run bridge
34+
env:
35+
LIBRARY: libpisp
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GITHUB_REPOSITORY: ${{ github.repository }}
38+
GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
39+
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
40+
GITHUB_BASE_REF: ${{ github.base_ref }}
41+
CAMERA_TESTER_URL: ${{ secrets.CAMERA_TESTER_URL }}
42+
CAMERA_TESTER_PROJECT_ID: ${{ secrets.CAMERA_TESTER_PROJECT_ID }}
43+
CAMERA_TESTER_TRIGGER_TOKEN: ${{ secrets.CAMERA_TESTER_TRIGGER_TOKEN }}
44+
CAMERA_TESTER_API_TOKEN: ${{ secrets.CAMERA_TESTER_API_TOKEN }}
45+
run: |
46+
. .venv/bin/activate
47+
python -m camera_tester.bridge

.github/workflows/libpisp-build-test.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/pisp-verification.test.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)