chore: add_protocol #47
4 changed files with 391 additions and 710 deletions
20
.github/actions/setup-cache-go/action.yaml
vendored
20
.github/actions/setup-cache-go/action.yaml
vendored
|
|
@ -1,30 +1,39 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
name: 'Forgejo Actions to setup Go and cache dependencies'
|
||||
author: 'Forgejo authors'
|
||||
name: 'Setup Go and cache dependencies'
|
||||
author: 'Forgejo authors, Marcel S. Henselin'
|
||||
description: |
|
||||
Wrap the setup-go with improved dependency caching.
|
||||
|
||||
inputs:
|
||||
username:
|
||||
description: 'User for which to manage the dependency cache'
|
||||
default: root
|
||||
|
||||
go-version:
|
||||
description: "go version to install"
|
||||
default: '1.25'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Install zstd for faster caching"
|
||||
shell: bash
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get -q install -qq -y zstd
|
||||
|
||||
- name: "Set up Go using setup-go"
|
||||
uses: https://data.forgejo.org/actions/setup-go@v6
|
||||
uses: https://code.forgejo.org/actions/setup-go@v6
|
||||
id: go-version
|
||||
with:
|
||||
go-version-file: "go.mod"
|
||||
go-version: ${{ inputs.go-version }}
|
||||
check-latest: true # Always check for the latest patch release
|
||||
# go-version-file: "go.mod"
|
||||
# do not cache dependencies, we do this manually
|
||||
cache: false
|
||||
|
||||
- name: "Get go environment information"
|
||||
shell: bash
|
||||
id: go-environment
|
||||
run: |
|
||||
chmod 755 $HOME # ensure ${RUN_AS_USER} has permission when go is located in $HOME
|
||||
|
|
@ -36,6 +45,7 @@ runs:
|
|||
GO_VERSION: ${{ steps.go-version.outputs.go-version }}
|
||||
|
||||
- name: "Create cache folders with correct permissions (for non-root users)"
|
||||
shell: bash
|
||||
if: inputs.username != 'root'
|
||||
# when the cache is restored, only the permissions of the last part are restored
|
||||
# so assuming that /home/user exists and we are restoring /home/user/go/pkg/mod,
|
||||
|
|
|
|||
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
|
|
@ -146,6 +146,17 @@ jobs:
|
|||
- name: Test
|
||||
run: make test
|
||||
|
||||
- name: Check coverage threshold
|
||||
shell: bash
|
||||
run: |
|
||||
make coverage
|
||||
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
||||
echo "Coverage: $COVERAGE%"
|
||||
if (( $(echo "$COVERAGE < 80" | bc -l) )); then
|
||||
echo "Coverage is below 80%"
|
||||
# exit 1
|
||||
fi
|
||||
|
||||
- name: Archive code coverage results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func (p *Provider) createVersionsFile() error {
|
|||
// Build the versions file...
|
||||
version := Version{
|
||||
Version: p.Version,
|
||||
Protocols: []string{"5.1"},
|
||||
Protocols: []string{"5.1", "6.0"},
|
||||
Platforms: nil,
|
||||
}
|
||||
for _, sum := range shasums {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue