forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 2.37 KB
/
integration_tests.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Run Integration Tests
on:
workflow_run:
workflows: ["AndroidX Presubmits"]
types: [completed]
jobs:
run_integration_tests:
runs-on: ubuntu-latest
if: ${{ !github.event.repository.fork && github.event.workflow_run.conclusion == 'success' }}
name: Run integration tests on FTL
steps:
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'zulu'
- name: "set output directory"
run: echo "output-dir=$(readlink -f .)/outputs" >> $GITHUB_OUTPUT
id: dirs
- id: run_tests
uses: androidX/androidx-ci-action@dist-latest
with:
target-run-id: ${{ github.event.workflow_run.id }}
gcp-token: ${{ secrets.GCP_SA_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
output-folder: ${{ steps.dirs.outputs.output-dir }}
gcp-bucket-name: "androidx-ftl-test-results"
gcp-bucket-path: "github-ci-action"
log-file: ${{ steps.dirs.outputs.output-dir }}/ftl-logs.txt
device-specs: Pixel2.arm:30
use-test-config-files: true
test-suite-tags: androidx_unit_tests
- uses: actions/upload-artifact@v4
if: always()
with:
name: outputs
path: ${{ steps.dirs.outputs.output-dir }}
teardown:
runs-on: ubuntu-latest
needs: [run_integration_tests]
if: ${{ !github.event.repository.fork && always() }} # always() is required so that this job will run irrespective of status of upstream 'run_integration_test' job.
steps:
- name: Parse workflow status
id: workflow-status
run: |
set -x
if [ "${{ needs.run_integration_tests.result }}" == "success" ] && \
[ "${{ github.event.workflow_run.conclusion }}" == "success" ]
then
echo "result=true" >> $GITHUB_OUTPUT
else
echo "result=false" >> GITHUB_OUTPUT
fi
- name: Result WebHook
uses: androidx/github-workflow-webhook-action@main
with:
url: 'https://androidx.dev/github/androidX/presubmit/hook'
secret: ${{ secrets.ANDROIDX_PRESUBMIT_HOOK_SECRET }}
payload: '{ "platform": "all", "token": "${{ secrets.GITHUB_TOKEN }}", "state": "completed", "success": ${{ steps.workflow-status.outputs.result }}, "src" : "workflow_run" }'