chore(deps): Bump markdown-it, @vuepress/plugin-docsearch, vuepress, vuepress-plugin-seo2 and vuepress-plugin-sitemap2 in /docs #2704
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v5 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| 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@v6 | |
| 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@v6 | |
| with: | |
| go-version: '1.26' | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: {} | |
| needs: | |
| - lint | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26' | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Cache Go modules | |
| uses: actions/cache@v5 | |
| 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/github-action@v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: coverage.lcov | |
| e2e: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: read | |
| needs: | |
| - lint | |
| - build_docker_e2e_image | |
| steps: | |
| # Setup Go and checkout | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26' | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Cache Go modules | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| # Prepare SeaweedFS (S3-compatible storage) | |
| - name: Start SeaweedFS container | |
| run: | | |
| docker run -d \ | |
| --name seaweedfs \ | |
| -p 8333:8333 \ | |
| -v ${{ github.workspace }}/.github/seaweedfs/s3.json:/etc/seaweedfs/s3.json \ | |
| chrislusf/seaweedfs server -s3 -s3.config=/etc/seaweedfs/s3.json | |
| - name: Wait for SeaweedFS to be ready | |
| run: | | |
| for i in {1..30}; do | |
| if curl -s http://127.0.0.1:8333 > /dev/null 2>&1; then | |
| echo "SeaweedFS is ready" | |
| break | |
| fi | |
| echo "Waiting for SeaweedFS... ($i/30)" | |
| sleep 1 | |
| done | |
| - name: Create test bucket | |
| env: | |
| AWS_ACCESS_KEY_ID: admin | |
| AWS_SECRET_ACCESS_KEY: admin | |
| run: | | |
| aws --endpoint-url http://127.0.0.1:8333 s3 mb s3://test-bucket | |
| # Prepare Git | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| 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/ssh-agent@v0.8.0 | |
| 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:8333 | |
| 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: admin | |
| AWS_SECRET_ACCESS_KEY: admin | |
| run: go test ./e2e | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: {} | |
| needs: | |
| - lint | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26' | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Cache Go modules | |
| uses: actions/cache@v5 | |
| 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@v5 | |
| - 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@v5 | |
| - 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@v5 | |
| - name: Setup node | |
| uses: ./.github/actions/setup-node | |
| - name: Build static website | |
| working-directory: docs | |
| run: npm run build |