Skip to content

Commit 3312c3b

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 9334211 commit 3312c3b

3 files changed

Lines changed: 50 additions & 88 deletions

File tree

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