Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Travis/Appveyor CI with GitHub Action Workflow #1242

Merged
merged 6 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run TUF tests and linter

on: [push, pull_request, workflow_dispatch]

jobs:
build:
strategy:
fail-fast: false
# Run regular TUF tests on each OS/Python combination, plus special tests
# (sslib master) and linters on Linux/Python3.x only.
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest, windows-latest]
toxenv: [py]
include:
- python-version: 3.x
os: ubuntu-latest
toxenv: with-sslib-master
experimental: true
# TODO: Change to 3.x once pylint fully supports Python 3.9
- python-version: 3.8
os: ubuntu-latest
toxenv: lint

runs-on: ${{ matrix.os }}

steps:
- name: Checkout TUF
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Find pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: pip cache
uses: actions/cache@v2
with:
# Use the os dependent pip cache directory found above
path: ${{ steps.pip-cache.outputs.dir }}
# A match with 'key' counts as cache hit
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
# A match with 'restore-keys' is used as fallback
restore-keys: ${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox

- name: Run tox
run: tox -e ${{ matrix.toxenv }}
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# <img src="https://cdn.rawgit.com/theupdateframework/artwork/3a649fa6/tuf-logo.svg" height="100" valign="middle" alt="TUF"/> A Framework for Securing Software Update Systems

[![Travis-CI](https://travis-ci.com/theupdateframework/tuf.svg?branch=develop)](https://travis-ci.com/theupdateframework/tuf)
[![Coveralls](https://coveralls.io/repos/theupdateframework/tuf/badge.svg?branch=develop)](https://coveralls.io/r/theupdateframework/tuf?branch=develop)
![Build](https://github.com/theupdateframework/tuf/workflows/Run%20TUF%20tests%20and%20linter/badge.svg)
![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=theupdateframework/tuf)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Ftheupdateframework%2Ftuf.svg?type=shield)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Ftheupdateframework%2Ftuf?ref=badge_shield)
[![CII](https://bestpractices.coreinfrastructure.org/projects/1351/badge)](https://bestpractices.coreinfrastructure.org/projects/1351)
[![PyPI](https://img.shields.io/pypi/v/tuf)](https://pypi.org/project/tuf/)

Expand Down
33 changes: 0 additions & 33 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ guidelines](https://github.com/secure-systems-lab/code-style-guidelines), and
must unit test any new software feature or change. Submitted pull requests
undergo review and automated testing, including, but not limited to:

* Unit and build testing via [Travis CI](https://travis-ci.com/) and
* Unit and build testing via [GitHub Actions](https://github.com/theupdateframework/tuf/actions) and
[Tox](https://tox.readthedocs.io/en/latest/).
* Static code analysis via [Pylint](https://www.pylint.org/) and
[Bandit](https://wiki.openstack.org/wiki/Security/Projects/Bandit).
Expand Down
6 changes: 4 additions & 2 deletions tests/test_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -1344,10 +1344,12 @@ def test_6_download_target(self):
self.repository_updater.download_target(targetinfo, bad_destination_directory)

except OSError as e:
self.assertTrue(e.errno == errno.ENAMETOOLONG or e.errno == errno.ENOENT)
self.assertTrue(
e.errno in [errno.ENAMETOOLONG, errno.ENOENT, errno.EINVAL],
"wrong errno: " + str(e.errno))

else:
self.fail('Expected an OSError of type ENAMETOOLONG or ENOENT')
self.fail('No OSError raised')


# Test: Invalid arguments.
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ deps =
# installation (see `skipsdist`), to get relative paths in coverage reports
--editable {toxinidir}

install_command = pip install --pre {opts} {packages}
# FIXME: use legacy resolver because https://github.com/pypa/pip/issues/9215
install_command = pip install --use-deprecated=legacy-resolver --pre {opts} {packages}


# Develop test env to run tests against securesystemslib's master branch
Expand Down