-
Notifications
You must be signed in to change notification settings - Fork 8
70 lines (55 loc) · 1.89 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Run tests and apply terraform changes for current branch
on: [ push ]
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
container:
image: quay.io/azavea/openjdk-gdal:3.1-jdk8-slim
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 default tests
run: ./sbt ++$SCALA_VERSION "testOnly -- -n DefaultTag" coverage coverageReport
- 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]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
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: 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-geotrellis-jars-write
- name: Build Assembly
run: sbt assembly
- name: Publish Assembly
run: aws s3 cp target/scala-2.12/*.jar s3://gfwpro-geotrellis-jars/release/