Skip to content

chore(deps): Bump github.com/aws/aws-sdk-go from 1.45.0 to 1.52.2 #2518

chore(deps): Bump github.com/aws/aws-sdk-go from 1.45.0 to 1.52.2

chore(deps): Bump github.com/aws/aws-sdk-go from 1.45.0 to 1.52.2 #2518

Workflow file for this run

name: Build scrt
on:
push:
branches:
- 'main'
tags-ignore:
- '*'
pull_request:
branches:
- '**'
jobs:
build_docker_e2e_image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Save public key to file
run: 'cp .github/docker/scrt_id_rsa.pub ./scrt_id_rsa.pub'
- name: Build Git test container
uses: docker/build-push-action@v4
with:
file: .github/docker/Dockerfile_git+openssh
context: .
tags: scrt-git-test:${{ github.sha }}
outputs: type=docker,dest=/tmp/git-openssh-image.tar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: git-openssh-image
path: /tmp/git-openssh-image.tar
lint:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
test:
runs-on: ubuntu-latest
permissions: {}
needs:
- lint
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout
uses: actions/checkout@v3
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Test
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...
- name: Install gcov2lcov
run: go install github.com/jandelgado/gcov2lcov@latest
- name: Convert coverage.out to coverage.lcov
run: gcov2lcov -infile coverage.out -outfile coverage.lcov
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
e2e:
runs-on: ubuntu-latest
permissions:
packages: read
services:
minio:
# Use Bitnami image here because default minio image runs the executable
# and GitHub actions won't let us pass args to docker create so we can't
# change the entrypoint
image: bitnami/minio
options: --name=minio
ports:
- 9000:9000
needs:
- lint
- build_docker_e2e_image
steps:
# Setup Go and checkout
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout
uses: actions/checkout@v3
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# Prepare MinIO
- name: Create test bucket
run: docker exec minio mkdir -p /data/test-bucket
# Prepare Git
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: git-openssh-image
path: /tmp
- name: Run git-openssh container
run: |
docker load --input /tmp/git-openssh-image.tar
docker run -d \
--env PUBLIC_KEY_FILE="/config/scrt_id_rsa.pub" \
--env USER_NAME=scrt \
-p 22222:2222 \
scrt-git-test:${{ github.sha }}
- name: Get git container SSH public key
id: git_ssh_public_key
run: |
sleep 3
echo ::set-output name=known_host::$(ssh-keyscan -p 22222 -t ecdsa 127.0.0.1)
- name: Get SSH private key
id: git_ssh_private_key
uses: actions/github-script@v6
with:
script: |
const fs = require('fs')
const buf = fs.readFileSync('.github/docker/scrt_id_rsa')
core.setOutput('private_key', buf.toString())
- name: Add private SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ steps.git_ssh_private_key.outputs.private_key }}
name: scrt_id_rsa
known_hosts: ${{ steps.git_ssh_public_key.outputs.known_host }}
config: |
Host scrt-git-test
HostName 127.0.0.1
Port 22222
User scrt
IdentitiesOnly yes
IdentityFile /home/runner/.ssh/scrt_id_rsa
- name: Output SSH status for debug purposes
run: |
cat /home/runner/.ssh/config
cat /home/runner/.ssh/known_hosts
cat /home/runner/.ssh/scrt_id_rsa
- name: Start SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ steps.git_ssh_private_key.outputs.private_key }}
# Run tests
- name: Run tests
env:
SCRT_TEST_E2E: y
SCRT_TEST_E2E_S3_ENDPOINT_URL: http://127.0.0.1:9000
SCRT_TEST_E2E_S3_REGION: us-east-1
SCRT_TEST_E2E_GIT_REPOSITORY_URL: scrt@scrt-git-test:repos/scrt-test.git
SCRT_TEST_E2E_GIT_BRANCH: main
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: miniosecret
run: go test ./e2e
build:
runs-on: ubuntu-latest
permissions: {}
needs:
- lint
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout
uses: actions/checkout@v3
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Build
run: go build -v .
lint-docs:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: ./.github/actions/setup-node
- name: Lint documentation
working-directory: docs
run: npm run lint
tsc-check-docs:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: ./.github/actions/setup-node
- name: Run Typescript compiler
working-directory: docs
run: npm run tsc
build-docs:
runs-on: ubuntu-latest
permissions: {}
needs:
- 'lint-docs'
- 'tsc-check-docs'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: ./.github/actions/setup-node
- name: Build static website
working-directory: docs
run: npm run build