-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into notary-comparison
Signed-off-by: Radoslav Dimitrov <[email protected]>
- Loading branch information
Showing
263 changed files
with
10,842 additions
and
3,834 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# go enforces lf line endings | ||
*.go eol=lf | ||
|
||
# testdata should not be mangled by git | ||
*.json binary |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Please fill in the fields below to submit a pull request. The more information that is provided, the better. | ||
|
||
Fixes #<Issue> | ||
|
||
Release Notes: <!-- What comments/remarks should we include in the release notes for this change? --> | ||
|
||
**Types of changes**: | ||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). **Please ensure that your PR title** is a [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) breaking change (with a `!`, as in `feat!: change foo`). | ||
|
||
**Description of the changes being introduced by the pull request**: | ||
|
||
**Please verify and check that the pull request fulfills the following requirements**: | ||
|
||
- [ ] Tests have been added for the bug fix or new feature | ||
- [ ] Docs have been added for the bug fix or new feature |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 | ||
# Monitor Go dependencies | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
time: "10:00" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
open-pull-requests-limit: 10 | ||
# Monitor Github Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
time: "10:00" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
open-pull-requests-limit: 10 | ||
# Monitor Python test dependencies | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
time: "10:00" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
open-pull-requests-limit: 10 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Changelog checks" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
conventional-commits-lint-check: | ||
name: "Lint PR title" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: | ||
uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
tags: | ||
- "v*" | ||
name: CI | ||
permissions: | ||
contents: write | ||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
tuf: | ||
needs: tests | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
cli-name: tuf | ||
tuf-client: | ||
needs: tests | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
cli-name: tuf-client |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ master ] | ||
schedule: | ||
- cron: '25 14 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
cli-name: | ||
required: true | ||
type: string | ||
name: Release | ||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get Go version | ||
uses: arnested/go-version-action@07a3c271151243461cae54bc473636f4b6c9b5d8 | ||
id: go-version | ||
- name: Set up Go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | ||
with: | ||
go-version: ${{ steps.go-version.outputs.minimal }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 | ||
with: | ||
distribution: goreleaser | ||
version: "v1.7.0" | ||
args: release --config ./.goreleaser/${{ inputs.cli-name }}.yml --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
on: | ||
schedule: | ||
- cron: "0 13 * * *" | ||
workflow_dispatch: | ||
name: Specification version check | ||
jobs: | ||
# Get the latest TUF specification release and open an issue (if needed) | ||
specification-bump-check: | ||
permissions: | ||
contents: read | ||
issues: write | ||
uses: theupdateframework/specification/.github/workflows/check-latest-spec-version.yml@master | ||
with: | ||
tuf-version: "v1.0.32" # Should be updated to the according version either manually or extracted automatically as how it's done in python-tuf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
on: | ||
workflow_call: | ||
name: Tests | ||
jobs: | ||
get-go-versions: | ||
name: Collect available Go versions | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.versions.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: arnested/go-version-action@07a3c271151243461cae54bc473636f4b6c9b5d8 | ||
id: versions | ||
|
||
run: | ||
strategy: | ||
fail-fast: false # Keep running if one leg fails. | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} | ||
runs-on: ${{ matrix.os }} | ||
needs: get-go-versions | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup - Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Setup - Python | ||
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
cache-dependency-path: "requirements-test.txt" | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade -r requirements-test.txt | ||
- name: Run tests | ||
run: go test -race -covermode atomic -coverprofile='profile.cov' ./... | ||
|
||
- name: Send coverage | ||
uses: shogo82148/actions-goveralls@df920a6a2468668dfcf71a0b43817f89eaa5ea04 | ||
with: | ||
path-to-profile: profile.cov | ||
flag-name: Go-${{ matrix.go-version }} | ||
parallel: true | ||
|
||
golangci: | ||
strategy: | ||
matrix: | ||
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
needs: get-go-versions | ||
steps: | ||
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 | ||
with: | ||
version: v1.51 # has to be pinned and thus manually updated due to https://github.com/golangci/golangci-lint-action/blob/6a290f7d5d488e1e423b0b37fe802c822ca2c08c/README.md?plain=1#L108 | ||
args: --timeout 5m --verbose |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.DS_Store | ||
cmd/tuf/tuf | ||
cmd/tuf-client/tuf-client | ||
.vscode | ||
*~ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
linters: | ||
disable-all: true | ||
enable: | ||
- staticcheck | ||
- gofmt | ||
- govet | ||
- gosimple | ||
- unused | ||
- typecheck | ||
- forbidigo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
project_name: tuf-client | ||
builds: | ||
- ldflags: | ||
- "-s -w" | ||
- "-extldflags=-zrelro" | ||
- "-extldflags=-znow" | ||
env: | ||
- "CGO_ENABLED=0" | ||
- "GO111MODULE=on" | ||
flags: | ||
- -mod=readonly | ||
- -trimpath | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
main: ./cmd/tuf-client/ | ||
source: | ||
enabled: true | ||
changelog: | ||
use: github | ||
groups: | ||
- title: "Breaking changes" | ||
regexp: "^.*BREAKING CHANGE[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: "Bug fixes" | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 2 | ||
- title: Others | ||
order: 999 | ||
release: | ||
# If set to auto, will mark the release as not ready for production | ||
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1 | ||
prerelease: auto |
Oops, something went wrong.