Skip to content

added - characters

added - characters #4

Workflow file for this run

name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Build with Maven including only unit testing (with SonarCloud)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn --batch-mode --update-snapshots test org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Prepare database for integration tests
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot < src/main/resources/database.sql
mvn --batch-mode --update-snapshots compile
mvn --batch-mode --update-snapshots datanucleus:enhance
mvn --batch-mode --update-snapshots datanucleus:schema-create
mvn --batch-mode --update-snapshots exec:java -Pdatos
- name: Build with Maven including integration tests
run: mvn --batch-mode --update-snapshots verify -Pintegracion
- name: Retrieve version
run: echo "::set-output name=TAG_NAME::$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)"
id: version
- uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: ${{ steps.version.outputs.TAG_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/simple-service-${{ steps.version.outputs.TAG_NAME }}.jar
asset_name: simple-service-${{ steps.version.outputs.TAG_NAME }}.jar
tag: ${{ steps.version.outputs.TAG_NAME }}
release_name: ${{ steps.version.outputs.TAG_NAME }}
overwrite: true