-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (45 loc) · 1.51 KB
/
gradle-check-build.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
name: Gradle Check and Build Workflow
on:
# FIXME: secrets not available from pull_request forks
pull_request:
branches:
- "dev"
workflow_dispatch: {}
jobs:
build-linux:
env:
# required for local testing without risking pulling the wrong image
TEST_TAG: gipo999/tomcat-webapp-boilerplate:test
permissions:
security-events: write
packages: read
issues: write
actions: read
contents: read
if: github.event.pull_request.draft == false
name: Lint and Build on Linux Job
runs-on: ubuntu-latest
steps:
- name: Checkout sources Step
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Setup CI environment
uses: ./.github/actions/ci-setup
# run the gradle check and build tasks
- name: Build with Gradle Wrapper Step
# buildWar runs check, test, war tasks
# at this point we won't know if the app will run in a container
run: ./gradlew buildWar
- name: Upload coverage to Codecov
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Setup DOCKER environment
uses: ./.github/actions/docker-setup
# test the docker image
- name: Build, run and test container
uses: ./.github/actions/build-run-testcontainer
with:
docker_tag: ${{ env.TEST_TAG }}
port_maps: "8080:8080"
load: true
push: false