[Snyk] Upgrade com.amazonaws:aws-java-sdk-core from 1.11.965 to 1.12.648 #912
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Test | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
create_env: | |
name: Build Timbermill For Testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Build Timbermill Server For Testing | |
run: mvn -B package -DskipTests --file timbermill-java/pom.xml | |
- run: mkdir jar | |
- run: cp timbermill-java/timbermill-server/target/timbermill-server-*.jar jar/timbermill-server.jar | |
- name: Upload Timbermill Server Jar | |
uses: actions/upload-artifact@v2 | |
with: | |
name: server | |
path: jar/timbermill-server.jar | |
run_tests: | |
name: Run Timbermill Tests | |
needs: create_env | |
runs-on: ubuntu-latest | |
env: | |
LOCATION_IN_DISK: ./ | |
CACHE_STRATEGY: redis | |
REDIS_HOST: localhost | |
PERSISTENCE_STRATEGY: redis | |
LIMIT_FOR_PERIOD: 50 | |
steps: | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- uses: actions/checkout@v2 | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Run Elasticsearch | |
uses: getong/[email protected] | |
with: | |
elasticsearch version: '7.8.1' | |
host port: 9200 | |
container port: 9200 | |
host node port: 9300 | |
node port: 9300 | |
discovery type: 'single-node' | |
- name: Redis Server in GitHub Actions | |
uses: supercharge/[email protected] | |
- name: Download Timbermill Server | |
uses: actions/download-artifact@v2 | |
with: | |
name: server | |
- name: Run Timbermill Server | |
run: java -jar timbermill-server.jar & | |
- name: Run Tests | |
run: mvn -B test --file timbermill-java/pom.xml | |
deploy_client_snapshot: | |
name: Deploy Client Jar To Snapshot Repo | |
needs: run_tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- uses: actions/checkout@v2 | |
- name: Configure GPG Key | |
run: | | |
mkdir -p ~/.gnupg/ | |
printf "$GPG_SIGNING_KEY" | base64 --decode > ~/.gnupg/private.key | |
gpg --import ~/.gnupg/private.key | |
env: | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
- name: Change Client Version | |
run: mvn versions:set-property --file timbermill-java/pom.xml -Dproperty=timbermill.version -DgenerateBackupPoms=false -DnewVersion=${{ github.head_ref }}-SNAPSHOT | |
- name: Deploy Snapshots | |
run: mvn -B clean deploy --file timbermill-java/pom.xml -DskipTests -pl timbermill-api,timbermill-client | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
- name: Comment Snapshot Version In PR | |
uses: unsplash/comment-on-pr@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
msg: Deployed Timbermill Snapshot JARs version **${{ github.head_ref }}-SNAPSHOT** | |
check_for_duplicate_msg: true |