[cpackget] --concurrent-downloads (default 5) corrupts downloaded *.pdsc files #197 #413
Workflow file for this run
This file contains 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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
paths: | |
- .github/workflows/test.yml | |
- cmd/**/*.go | |
- testdata/**/* | |
- makefile | |
- .golangci.yml | |
- go.mod | |
- go.sum | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
# must be specified without patch version | |
version: v1.51 | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Check formatting | |
run: | | |
make format-check | |
vulnerability-check: | |
name: "Vulnerability check" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Install govulncheck | |
run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
- name: Run vulnerability check | |
run: | | |
echo "$(govulncheck ./... 2>&1 | tee vulnerability_report.out)" | |
test -n "$(grep 'No vulnerabilities found.' vulnerability_report.out)" | |
# Make sure local_repository.pidx is linted against PackIndex.xsd | |
xmllint: | |
name: Xmllint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Install xmllint | |
run: sudo apt-get update && sudo apt-get install libxml2-utils | |
- name: Check if local_repository.pidx is valid | |
run: | | |
make test-xmllint-localrepository | |
test-amd64: | |
strategy: | |
matrix: | |
# Tests on Mac are currently broken | |
goos: [windows, linux, darwin] | |
include: | |
- goos: windows | |
runs-on: windows-latest | |
- goos: linux | |
runs-on: ubuntu-latest | |
- goos: darwin | |
runs-on: macos-latest | |
name: "${{ matrix.goos }} | amd64" | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Unit testing | |
run: | | |
make coverage-check | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
if: always() | |
with: | |
files: cover.out | |
os: ${{ matrix.goos }} | |
fail_ci_if_error: true | |
functionalities: fix | |
test-linux-arm64: | |
name: "linux | arm64" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Unit testing | |
uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: aarch64 | |
distro: ubuntu_latest | |
env: | | |
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 | |
install: | | |
apt-get update -qq -y | |
apt-get install -qq -y software-properties-common git make | |
add-apt-repository -y ppa:longsleep/golang-backports | |
apt-get update -qq -y | |
apt-get install -qq -y golang-1.20 | |
run: | | |
export PATH=$PATH:/usr/lib/go-1.20/bin | |
git clone --depth 1 ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} | |
cd cpackget | |
git fetch --depth 1 origin ${GITHUB_REF} | |
git checkout FETCH_HEAD | |
make coverage-check | |