Fix lint warnings, Add some lint rulesets (#257) #555
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
# Copyright 2023 VMware, Inc. | |
# | |
# This product is licensed to you under the BSD-2 license (the "License"). | |
# You may not use this product except in compliance with the BSD-2 License. | |
# This product may include a number of subcomponents with separate copyright | |
# notices and license terms. Your use of these subcomponents is subject to | |
# the terms and conditions of the subcomponent's license, as noted in the | |
# LICENSE file. | |
# | |
# SPDX-License-Identifier: BSD-2-Clause | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
name: CI | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install lint dependencies | |
run: make env/pyvenv.cfg | |
- name: Run linters | |
run: make lint | |
test-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the client wrapper | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run test suite | |
uses: ./ | |
with: | |
entrypoint: "clients/python-tuf/python_tuf.py" | |
test-go: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the client wrapper | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Go | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version: "1.22.3" | |
cache-dependency-path: "clients/go-tuf-metadata/go.sum" | |
- name: Build client wrapper | |
run: cd clients/go-tuf && go build . | |
- name: Run test suite | |
uses: ./ | |
with: | |
entrypoint: "clients/go-tuf/go-tuf" |