b93e134b5b
All checks were successful
/ Builds (pull_request) Successful in 1m25s
/ Lint (pull_request) Successful in 3m48s
/ Test (pull_request) Successful in 3m15s
/ DCO (pull_request) Successful in 35s
/ Builds (push) Successful in 1m9s
/ Lint (push) Successful in 4m1s
/ Test (push) Successful in 2m55s
Signed-off-by: Aleksey Kravchenko <al.kravchenko@yadro.com>
67 lines
No EOL
1.9 KiB
YAML
67 lines
No EOL
1.9 KiB
YAML
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- tcl/master
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '1.23'
|
|
cache: true
|
|
|
|
- name: Install linters
|
|
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
|
|
- name: Run linters
|
|
run: make check
|
|
test:
|
|
name: Test
|
|
runs-on: oci-runner
|
|
strategy:
|
|
matrix:
|
|
go_versions: [ '1.23' ]
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '${{ matrix.go_versions }}'
|
|
|
|
- name: Tests for the FrostFS backend
|
|
env:
|
|
RESTIC_TEST_FUSE: false
|
|
AIO_IMAGE: truecloudlab/frostfs-aio
|
|
AIO_VERSION: 1.7.0-nightly.4
|
|
RCLONE_CONFIG: /config/rclone.conf
|
|
|
|
# run only tests related to FrostFS backend
|
|
run: |-
|
|
podman-service.sh
|
|
podman info
|
|
|
|
mkdir /config
|
|
printf "[TestFrostFS]\ntype = frostfs\nendpoint = localhost:8080\nwallet = /config/wallet.json\nplacement_policy = REP 1\nrequest_timeout = 20s\nconnection_timeout = 21s" > /config/rclone.conf
|
|
|
|
echo "Run frostfs aio container"
|
|
docker run -d --net=host --name aio $AIO_IMAGE:$AIO_VERSION --restart always -p 8080:8080
|
|
|
|
echo "Wait for frostfs to start"
|
|
until docker exec aio curl --fail http://localhost:8083 > /dev/null 2>&1; do sleep 0.2; done;
|
|
|
|
echo "Issue creds"
|
|
docker exec aio /usr/bin/issue-creds.sh native
|
|
echo "Copy wallet"
|
|
docker cp aio:/config/user-wallet.json /config/wallet.json
|
|
|
|
echo "Start tests"
|
|
go test -v github.com/rclone/rclone/backend/frostfs |