-
Notifications
You must be signed in to change notification settings - Fork 36
62 lines (54 loc) · 2.11 KB
/
system.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
name: system tests
on: pull_request
jobs:
build:
name: RunTests
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Install ShellCheck
run: sudo apt-get install shellcheck
- name: Run ShellCheck
run: shellcheck -S warning ./tests/*.sh
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
id: go
- name: Get Dependencies
run: |
go get -v -t -d ./...
- name: Install BATS
run: |
git clone https://github.com/bats-core/bats-core.git
cd bats-core && ./install.sh $HOME
- name: Build
run: |
make testbin
export AWS_ACCESS_KEY_ID=user
export AWS_SECRET_ACCESS_KEY=pass
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile versity
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile versity
mkdir /tmp/gw
- name: Run tests
run: |
export AWS_ACCESS_KEY_ID=user
export AWS_SECRET_ACCESS_KEY=pass
VERSITYGW_TEST_ENV=$GITHUB_WORKSPACE/tests/.env.default $HOME/bin/bats ./tests/s3_bucket_tests.sh
VERSITYGW_TEST_ENV=$GITHUB_WORKSPACE/tests/.env.default $HOME/bin/bats ./tests/posix_tests.sh
- name: Run tests with static buckets
run: |
export AWS_ACCESS_KEY_ID=user
export AWS_SECRET_ACCESS_KEY=pass
export VERSITYGW_TEST_ENV=$GITHUB_WORKSPACE/tests/.env.default
source $VERSITYGW_TEST_ENV
export AWS_PROFILE AWS_REGION BUCKET_ONE_NAME BUCKET_TWO_NAME
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws s3 mb s3://$BUCKET_ONE_NAME
aws s3 mb s3://$BUCKET_TWO_NAME
RECREATE_BUCKETS=false $HOME/bin/bats ./tests/s3_bucket_tests.sh
RECREATE_BUCKETS=false $HOME/bin/bats ./tests/posix_tests.sh
aws s3 rb s3://$BUCKET_ONE_NAME
aws s3 rb s3://$BUCKET_TWO_NAME