-
Notifications
You must be signed in to change notification settings - Fork 37
52 lines (49 loc) · 1.5 KB
/
tests-aws.yml
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
name: Tests with AWS
on:
push:
branches:
- master
paths:
- '**.scala'
- '**.sbt'
workflow_dispatch:
env:
AWS_REGION: us-east-1
permissions:
id-token: write
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose-tests.yml') }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
cache: sbt
- uses: sbt/setup-sbt@v1
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
- name: Build migrator
run: ./build.sh
- name: Set up services
run: |
docker compose -f docker-compose-tests.yml up -d scylla spark-master spark-worker
.github/wait-for-port.sh 8000 # ScyllaDB Alternator
.github/wait-for-cql.sh scylla
.github/wait-for-port.sh 8080 # Spark master
.github/wait-for-port.sh 8081 # Spark worker
- name: Run tests accessing AWS
run: sbt "testOnly -- --include-categories=com.scylladb.migrator.AWS"
- name: Stop services
run: docker compose -f docker-compose-tests.yml down