GC-1943/update-Lob-address #180
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
name: Run Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, reopened, edited] | |
branches: | |
- main | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Create env file' | |
run: | | |
touch .env | |
echo LOB_API_LIVE_KEY=${{ secrets.LOB_API_LIVE_KEY }} >> .env | |
echo LOB_API_TEST_KEY=${{ secrets.LOB_API_TEST_KEY }} >> .env | |
cat .env | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 14 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 14 | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Run unit tests with Maven | |
run: mvn clean -B test | |
env: | |
LOB_API_TEST_KEY: ${{ secrets.LOB_API_TEST_KEY }} | |
LOB_API_LIVE_KEY: ${{ secrets.LOB_API_LIVE_KEY }} |