Repository navigation
74 lines (63 loc) · 2.48 KB
/
Copy pathbuild.yml
File metadata and controls
74 lines (63 loc) · 2.48 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: 'Build & Test'
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
detect-markdown-only:
uses: PostHog/.github/.github/workflows/detect-markdown-only.yml@ec25337d9fae0100622cbfea1bd5bd88284ac10b
permissions:
pull-requests: read
build:
needs: detect-markdown-only
name: Build Job
runs-on: ubuntu-latest
steps:
- name: Complete markdown-only PR check
if: needs.detect-markdown-only.outputs.markdown_only == 'true'
run: echo "Only Markdown files changed; no additional work is required for this check."
- name: Git checkout
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 'Set up Java 17'
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Gradle packages
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.m2/repository/org/robolectric
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make compile
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
run: make compile
- name: Test survey interactions
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
run: make testSurveyUI
- name: Check release tasks and dependency locks
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
run: make checkRelease
- name: Upload replay masking snapshot differences
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: replay-masking-snapshot-diffs
path: posthog-android/build/reports/replay-masking-snapshots/
if-no-files-found: ignore
- name: Make stop
if: needs.detect-markdown-only.outputs.markdown_only != 'true'
run: make stop