-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 2.05 KB
/
e2e-test.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
53
54
55
56
57
58
59
name: E2E tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
newman-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Create env file
run: |
touch .env
echo KEYCLOAK_PUBLIC_KEYS_URL='https://auth.dewberryanalytics.com/auth/realms/testing/protocol/openid-connect/certs' >> .env
echo MINIO_S3_ENDPOINT='http://minio:9000' >> .env
echo AWS_REGION='us-east-1' >> .env
echo MINIO_S3_DISABLE_SSL='true' >> .env
echo MINIO_S3_FORCE_PATH_STYLE='true' >> .env
echo MINIO_ACCESS_KEY_ID=user >> .env
echo MINIO_SECRET_ACCESS_KEY=password >> .env
echo MINIO_S3_REGION='us-east-1' >> .env
echo S3_MOCK=1 >> .env
echo AWS_S3_BUCKET='test-bucket' >> .env
echo S3API_SERVICE_PORT='5005' >> .env
echo AUTH_LEVEL=0 >> .env
- name: Substitute secret variables in JSON
env:
auth_password: ${{ secrets.AUTH_PASSWORD }}
KEYCLOAK_SECRET: ${{ secrets.KEYCLOAK_SECRET }}
run: |
echo "Is auth_password set: $(if [ -z "$auth_password" ]; then echo "No"; else echo "Yes"; fi)"
echo "Is KEYCLOAK_SECRET set: $(if [ -z "$KEYCLOAK_SECRET" ]; then echo "No"; else echo "Yes"; fi)"
envsubst < e2e-test/e2eEnv.template.json > e2e-test/e2eEnv.json
- name: Build the docker-compose stack
run: docker-compose build -d
- name: Create network
run: docker network create s3_net
- name: Build and Run the docker-compose stack
run: docker-compose up -d
- name: Run newman tests
run: >
docker run --network="host" -v /home/runner/work/s3api/s3api/e2e-test:/etc/newman postman/newman:5.3.1-alpine run /etc/newman/e2eCollection.json -e /etc/newman/e2eEnv.json --reporters cli --bail --color on
# Uncomment to print logs for debugging
# - name: Display docker-compose logs
# run: |
# docker-compose logs
# if: always()