Skip to content
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
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Run Securesystemslib tests

on: [push, pull_request, workflow_dispatch]

jobs:
build:
strategy:
fail-fast: false
# Run tests on each OS/Python combination
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
# TODO: Add windows-latest when gpg issues are solved
os: [ubuntu-latest, macos-latest]
toxenv: [py]

include:
- python-version: 2.7
os: ubuntu-latest
toxenv: purepy27
- python-version: 2.7
os: ubuntu-latest
toxenv: py27-no-gpg
- python-version: 3.8
os: ubuntu-latest
toxenv: purepy38
- python-version: 3.8
os: ubuntu-latest
toxenv: py38-no-gpg

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

steps:
- name: Checkout securesystemslib
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
pip install --upgrade tox

- name: Run tox
run: tox -e ${{ matrix.toxenv }}

37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include LICENSE

# Add test config files to show how to run tests
include tox.ini
include .travis.yml
include requirements*.txt

# Include all files under the tests directory (including test data)
Expand Down
7 changes: 2 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
Secure Systems Library
----------------------

.. image:: https://travis-ci.com/secure-systems-lab/securesystemslib.svg?branch=master
:target: https://travis-ci.com/secure-systems-lab/securesystemslib

.. image:: https://coveralls.io/repos/github/secure-systems-lab/securesystemslib/badge.svg?branch=master
:target: https://coveralls.io/github/secure-systems-lab/securesystemslib?branch=master
.. image:: https://github.com/secure-systems-lab/securesystemslib/workflows/Run%20Securesystemslib%20tests/badge.svg
:target: https://github.com/secure-systems-lab/securesystemslib/actions?query=workflow%3A%22Run+TUF+tests%22+branch%3Amaster

.. image:: https://api.dependabot.com/badges/status?host=github&repo=secure-systems-lab/securesystemslib
:target: https://api.dependabot.com/badges/status?host=github&repo=secure-systems-lab/securesystemslib
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, py36, py37, py38, py39 purepy27, purepy38
envlist = py27, py36, py37, py38, py39, purepy27, purepy38, py27-no-gpg, py38-no-gpg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Interesting how tox successfully builds a py39purepy27 env. :)

skipsdist = True

[testenv]
Expand Down Expand Up @@ -34,12 +34,14 @@ deps =
commands =
python -m tests.check_public_interfaces

# Below test envs require manual removal of gpg on the host system (see
# .travis.yml) and are excluded from the default tox run
[testenv:py27-no-gpg]
setenv =
GNUPG = nonexisting-gpg-for-testing
commands =
python -m tests.check_public_interfaces_gpg

[testenv:py38-no-gpg]
setenv =
GNUPG = nonexisting-gpg-for-testing
commands =
python -m tests.check_public_interfaces_gpg