-
Notifications
You must be signed in to change notification settings - Fork 102
40 lines (38 loc) · 1.26 KB
/
integration.yml
File metadata and controls
40 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
name: Run integration tests
on:
issue_comment:
types: [ created, edited, deleted ]
jobs:
dev_mod_test:
if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/integration')
runs-on: [ self-hosted, integration ]
steps:
- uses: actions/checkout@v4
- name: Run integration tests
env:
GITHUB_COMMENT: ${{ github.event.comment.body }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
. setup.sh
cd tests/integration
set -x
echo "integration test request: $GITHUB_COMMENT"
gh pr checkout ${{ github.event.issue.number }}
gh pr comment ${{ github.event.issue.number }} --body "Got integration test request \`$GITHUB_COMMENT\`"
cat >TEST_LOG <<LOG
Integration test results
\`\`\`
LOG
set +e
./device-module-test --integration "$GITHUB_COMMENT" 2>&1 | tee -a TEST_LOG
cat >>TEST_LOG <<LOG
\`\`\`
LOG
gh pr comment ${{ github.event.issue.number }} --body-file TEST_LOG
echo "============ ENVIRONMENT ============="
set
echo
echo "========== GITHUB CONTEXT ============"
echo "$GITHUB_CONTEXT"