Test using sbt/setup-sbt action. #644
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 and apply terraform changes for current branch | |
on: [ push ] | |
permissions: | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/globalforestwatch/openjdk8-gdal3.8.3-slim:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: coursier/cache-action@v6 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::617001639586:role/gfw-data-lake-read | |
- name: run pro tests | |
run: ./sbt ++$SCALA_VERSION "testOnly -- -n ProTag" coverage coverageReport | |
env: | |
GFW_FEATURE_FLAG: pro | |
- name: Run CodeCOV action | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: target/scala-2.12/coverage-report/cobertura.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: false | |
publish: | |
name: Publish Artifacts | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: coursier/cache-action@v6 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: 11.0.19 | |
- name: Setup sbt launcher | |
uses: sbt/setup-sbt@v1 | |
- name: Build Assembly | |
run: sbt assembly | |
- name: Publish Assembly | |
run: ls -l target/scala-2.12/*.jar |