Skip to content

Adicionando .env

Adicionando .env #50

Workflow file for this run

# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main","development" ]
pull_request:
branches: [ "main","development" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create .env File
run: |
echo "URL=$URL" > .env
echo "USER_NAME=$USER_NAME" > .env
echo "PASSWORD=$PASSWORD" > .env
echo "ACCESS_KEY=$ACCESS_KEY" > .env
echo "SECRET_KEY=$SECRET_KEY" > .env
echo "URL_TEST=$URL_TEST" > .env
echo "USER_NAME_TEST=$USER_NAME_TEST" > .env
echo "PASSWORD_TEST=$PASSWORD_TEST" > .env
env:
URL: ${{ secrets.URL }}
USER_NAME: ${{ secrets.USER_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
URL_TEST: ${{ secrets.URL_TEST }}
USER_NAME_TEST: ${{ secrets.USER_NAME_TEST }}
PASSWORD_TEST: ${{ secrets.PASSWORD_TEST }}
- uses: actions/checkout@v3
- name: Set up JDK 20.0.2
uses: actions/setup-java@v3
with:
java-version: '20.0.2'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run maven tests
uses: actions/setup-java@v3
with:
java-version: '20.0.2'
distribution: 'temurin'
cache: maven
- name: Test with Maven
run: mvn test