Compare commits
2 Commits
2c9f8dd51a
...
b1e9724a5c
Author | SHA1 | Date |
---|---|---|
trainerlord | b1e9724a5c | |
trainerlord | f0a7edcd61 |
|
@ -1,119 +0,0 @@
|
|||
name: Build
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
# We want to run on external PRs, but not on our own internal PRs as they'll be run
|
||||
# by the push to the branch.
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
||||
|
||||
steps:
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
|
||||
- name: Cache Gradle
|
||||
id: cache-gradle
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Grant execute permission to gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build -x test
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: "**/build/libs"
|
||||
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
|
||||
- name: Cache Gradle
|
||||
id: cache-gradle
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Grant execute permission to gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Test
|
||||
run: ./gradlew test
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Coverage
|
||||
run: ./gradlew jacocoTestReport
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload CodeCov Report
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
file: "**/build/reports/jacoco/**/*.xml"
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1.24
|
||||
if: always()
|
||||
with:
|
||||
files: "**/build/test-results/**/*.xml"
|
||||
|
||||
release:
|
||||
needs: [build, test]
|
||||
if: github.ref == 'refs/heads/master' || 'refs/heads/beta' || github.ref == 'refs/heads/alpha'
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
|
||||
- name: Set up Node.js v16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "16.x"
|
||||
|
||||
- name: Cache Gradle
|
||||
id: cache-gradle
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Grant execute permission for update-versions.sh
|
||||
run: chmod +x update-versions.sh
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_URL: "https://api.github.com/"
|
||||
run: npx --legacy-peer-deps -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p gradle-semantic-release-plugin -p semantic-release semantic-release
|
|
@ -0,0 +1,26 @@
|
|||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
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'
|
||||
cache: maven
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
Loading…
Reference in New Issue