-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.38 KB
/
build_test_workflow.yml
File metadata and controls
47 lines (43 loc) · 1.38 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
41
42
43
44
45
46
47
name: Device farm tractor project build, test and publish results workflow
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: ./gradlew build test
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.40
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: build/test-results/**/*.xml
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: test_results
path: |
build/reports/tests
build/test-results
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.1
if: always()
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build/reports/tests/test # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy