Repository navigation
64 lines (55 loc) · 1.98 KB
/
Copy pathpull-request.yml
File metadata and controls
64 lines (55 loc) · 1.98 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
name: Pull Requests
on:
pull_request:
permissions:
contents: read
jobs:
CodeAudits:
uses: evanchooly/workflows/.github/workflows/code-audits.yml@master
with:
java: 17
Build:
uses: evanchooly/workflows/.github/workflows/pull-request.yml@master
# the nested dependabot auto-merge job declares these; a called workflow can't exceed the caller's grant
permissions:
contents: write
pull-requests: write
secrets:
# a token other than GITHUB_TOKEN so the eventual merge triggers build.yml on master
AUTOMERGE_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
with:
java: 17
maven-flags: "-e -Dmorphia.mapper=critter"
# The Build job above runs a plain `install`, so critter has no pre-generated models and generates every model at
# runtime. This job covers the AOT path the way build.yml does: build, let critter-maven generate the test models,
# then run the tests without recompiling (test-compile would replace the woven classes). Pushes to this repo also run
# build.yml, but pull requests from forks only get this workflow.
CritterAot:
name: Critter (AOT)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Java
uses: actions/setup-java@v6
with:
java-version: 17
distribution: temurin
cache: maven
- name: Build without tests
run: ./mvnw -e -U install -DskipTests
- name: Generate critter test models
working-directory: core
run: ../mvnw -e dev.morphia.morphia:critter-maven:generate-test-models
- name: Test against the generated models
run: ./mvnw -e surefire:test -Dmorphia.mapper=critter
- name: Collect logs
uses: actions/upload-artifact@v7
if: failure()
with:
name: "logs-critter-aot-${{ github.run_id }}"
path: |
**/target/**/*.log
**/target/**/*.err
retention-days: 7