-
Notifications
You must be signed in to change notification settings - Fork 56
91 lines (76 loc) · 2.14 KB
/
services-test-s3.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: "Services Test S3"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
on:
push:
paths:
- 'services/s3/**'
tags-ignore:
- '**'
branches:
- '**'
pull_request:
paths:
- 'services/s3/**'
jobs:
services_test_s3:
name: "Services Test S3"
runs-on: self-hosted
strategy:
matrix:
go: [ "1.16", "1.17" ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Load secret
uses: 1password/load-secrets-action@v1
env:
STORAGE_S3_CREDENTIAL: op://Engineering/S3/testing/credential
STORAGE_S3_NAME: op://Engineering/S3/testing/name
STORAGE_S3_LOCATION: op://Engineering/S3/testing/location
- name: Checkout repository
uses: actions/checkout@v2
- name: Test
env:
STORAGE_S3_INTEGRATION_TEST: on
working-directory: services/s3
run: make integration_test
service_test_minio:
name: "Service Test Minio"
runs-on: ubuntu-latest
services:
minio:
image: wktk/minio-server
ports:
- 9000:9000
env:
MINIO_ACCESS_KEY: "minioadmin"
MINIO_SECRET_KEY: "minioadmin"
strategy:
matrix:
go: [ "1.16", "1.17" ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup test bucket
env:
AWS_ACCESS_KEY_ID: "minioadmin"
AWS_SECRET_ACCESS_KEY: "minioadmin"
AWS_EC2_METADATA_DISABLED: "true"
run: aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test
- name: Test
env:
STORAGE_S3_INTEGRATION_TEST: "on"
STORAGE_S3_CREDENTIAL: "hmac:minioadmin:minioadmin"
STORAGE_S3_NAME: "test"
STORAGE_S3_ENDPOINT: "http:127.0.0.1:9000"
STORAGE_S3_LOCATION: "local"
working-directory: services/s3
run: make integration_test