Skip to content

improve the clarity of the torrentstotal semantics #1360

improve the clarity of the torrentstotal semantics

improve the clarity of the torrentstotal semantics #1360

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
packages: read
security-events: read
pull-requests: read
strategy:
matrix:
go-version: [ '1.22', '1.23' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install cgo dependencies
run: sudo apt-get install -y libczmq-dev libsodium-dev
- name: Build
run: go build -v -tags fts5 .
- name: Test
run: CGO_ENABLED=1 go test -v -race -tags fts5 ./... -covermode=atomic -coverprofile=coverage.out
- name: Upload coverage report
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.out
flags: unittests
verbose: true
- name: GoLang CI Lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
args: --timeout=5m
docker:
name: Docker
needs: build
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
packages: write
security-events: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: .
tags: ghcr.io/${{ github.repository }}:next
push: true
- name: Delete untagged images
uses: dataaxiom/ghcr-cleanup-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}