mirror of
https://github.com/versity/versitygw.git
synced 2026-01-08 04:35:15 +00:00
74 lines
2.7 KiB
YAML
74 lines
2.7 KiB
YAML
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@v4
|
|
|
|
- name: Install ShellCheck and md5
|
|
run: sudo apt-get install shellcheck
|
|
|
|
- name: Run ShellCheck
|
|
run: shellcheck -S warning ./tests/*.sh
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
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: Install s3cmd
|
|
run: |
|
|
sudo apt-get install s3cmd
|
|
|
|
- name: Install mc
|
|
run: |
|
|
curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /usr/local/bin/mc
|
|
chmod 755 /usr/local/bin/mc
|
|
|
|
- name: Build and run, posix backend
|
|
run: |
|
|
make testbin
|
|
export AWS_ACCESS_KEY_ID=ABCDEFGHIJKLMNOPQRST
|
|
export AWS_SECRET_ACCESS_KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn
|
|
export AWS_REGION=us-east-1
|
|
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
|
|
aws configure set aws_region $AWS_REGION --profile versity
|
|
mkdir /tmp/gw
|
|
export WORKSPACE=$GITHUB_WORKSPACE
|
|
openssl genpkey -algorithm RSA -out versitygw.pem -pkeyopt rsa_keygen_bits:2048
|
|
openssl req -new -x509 -key versitygw.pem -out cert.pem -days 365 -subj "/C=US/ST=California/L=San Francisco/O=Versity/OU=Software/CN=versity.com"
|
|
mkdir cover iam
|
|
VERSITYGW_TEST_ENV=./tests/.env.default ./tests/run_all.sh
|
|
|
|
#- name: Build and run, s3 backend
|
|
# run: |
|
|
# make testbin
|
|
# export AWS_ACCESS_KEY_ID=ABCDEFGHIJKLMNOPQRST
|
|
# export AWS_SECRET_ACCESS_KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn
|
|
# export AWS_REGION=us-east-1
|
|
# aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile versity_s3
|
|
# aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile versity_s3
|
|
# aws configure set aws_region $AWS_REGION --profile versity_s3
|
|
# export AWS_ACCESS_KEY_ID_TWO=ABCDEFGHIJKLMNOPQRST
|
|
# export AWS_SECRET_ACCESS_KEY_TWO=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn
|
|
# export WORKSPACE=$GITHUB_WORKSPACE
|
|
# VERSITYGW_TEST_ENV=./tests/.env.s3 GOCOVERDIR=/tmp/cover ./tests/run_all.sh
|
|
|
|
- name: Coverage report
|
|
run: |
|
|
go tool covdata percent -i=cover
|