-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.13 KB
/
java_CI.yml
File metadata and controls
49 lines (41 loc) · 1.13 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
name: java CI
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
jobs:
test:
name: code code coverage test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Test with Gradle
run: ./gradlew build jacocoTestReport
- name: Report to CodeCov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: build and push to DockerHub
env:
REPO: meca
run: |
docker build -t $REPO .
docker tag $REPO:latest ${{ secrets.DOCKERHUB_USERNAME }}/$REPO:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/$REPO:latest