-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (43 loc) · 1.09 KB
/
build-test.yml
File metadata and controls
52 lines (43 loc) · 1.09 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
name: "Build & Test"
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
on:
schedule:
# Run once a day at 00:00 UTC
- cron: '0 0 * * *'
push:
branches: [main]
pull_request:
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
java-sdk:
name: "Java SDK Tests"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-copilot
- uses: actions/setup-java@v5
with:
java-version: "17"
distribution: "temurin"
- name: Run spotless check
run: |
mvn spotless:check
if [ $? -ne 0 ]; then
echo "❌ spotless:check failed. Please run 'mvn spotless:apply' in java"
exit 1
fi
echo "✅ spotless:check passed"
- name: Build SDK
run: mvn compile
- name: Run Java SDK tests
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
COPILOT_CLI_PATH: ${{ steps.cli-path.outputs.path }}
run: mvn verify